Detaljan opis problema:imam 4 erora
Dio skripte:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include
#include
#include
#include
//Important include you need to have streamer in-case you want this to work!
//Variables (Put them after your includes)
new iCP;
new UnderAttack;
new Captured;
new CP;
new Zone;
new timer;
new CountVar = 25;
new InCP;
new CountTime;
//=================================
new gTeam; //Team variable. ignore if you already got
#define TEAM_ARMY 0 //Ignore if you already got team defines
#define TEAM_TERRORIST 1 //Ignore if you already got team defines
#define TEAM_NONE 2 //Ignore if you already got team defines
#define ARMY_COLOR 0x375FFFFF
#define TERRORIST_COLOR 0xFF0000FF
//========Zone=Defines=============
#define Snakef 0
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
public OnGameModeInit()
{
CP = CreateDynamicCP(-34.5398,2350.1331,24.3026,5,0,0,-1,25);
Zone = GangZoneCreate(-96,2280,48,2406);
UnderAttack = -1;
Captured = -1;
tCP = TEAM_NONE;
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
iCP = -1;
InCP = 0;
if(tCP == TEAM_ARMY) return GangZoneShowForPlayer(playerid, Zone, 0x375FFFFF);
else if(tCP == TEAM_TERRORIST) return GangZoneShowForPlayer(playerid, Zone, 0xFF0000FF);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
if(InCP == 1)
{
UnderAttack = 0;
}
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
KillTimer(timer);
KillTimer(CountTime);
UnderAttack = 0;
return 1;
}
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == CP)
{
if(UnderAttack == 1)
{
SendClientMessage(playerid, 0xFF0000FF,"This zone is already being captured!");
}
else if(gTeam == tCP)
{
SendClientMessage(playerid, 0xFF0000FF,"This zone is already being captured!");
}
else if(gTeam == TEAM_NONE)
{
SendClientMessage(playerid, 0xFF0000FF,"You have no team so you cannot capture!");
}
else
{
UnderAttack = 1;
timer = SetTimerEx("SetCaptureZone", 25000, false,"i",playerid);
CountTime = SetTimerEx("CountDown", 1, false,"i", playerid);
iCP = Snakef;
InCP = 1;
Captured = 0;
if(gTeam == TEAM_ARMY)
{
GangZoneFlashForAll(Zone, ARMY_COLOR);
}
else if(gTeam == TEAM_TERRORIST)
{
GangZoneFlashForAll(Zone, TERRORIST_COLOR);
}
new string, name[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string),"%s is trying to capture theSnakef",name);
SendClientMessageToAll(ARMY_COLOR, string);
}
}
return 1;
}
public OnPlayerLeaveDynamicCP(playerid, checkpointid)
{
if(checkpointid == CP)
{
if(Captured == 1)
{
GangZoneStopFlashForAll(Zone);
UnderAttack = 0;
InCP = 0;
tCP = gTeam;
if(gTeam == TEAM_ARMY)
{
GangZoneShowForAll(Zone, ARMY_COLOR);
}
else if(gTeam == TEAM_TERRORIST)
{
GangZoneShowForAll(Zone, TERRORIST_COLOR);
}
KillTimer(timer);
KillTimer(CountTime);
}
else if(Captured == 0)
{
SendClientMessage(playerid, TERRORIST_COLOR,"You have left the flag you have failed to capture the zone!");
}
forward CountDown(playerid);
public CountDown(playerid)
{
CountVar--;
if(CountVar == 0)
{
CountVar = 25;
KillTimer(CountTime);
}
else
{
new str;
format(str, sizeof(str),"~n~~n~~n~~n~~n~~n~~r~%d/~y~25 ~w~Seconds left~n~~g~to capture", CountVar);
GameTextForPlayer(playerid, str, 1000, 3);
}
CountTime = SetTimerEx("CountDown", 1000, false,"i", playerid);
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}Neke slike/video za lakse dobivanje pomoci(neobavezno):
