14.11.2011, 09:28
Hello!
i cant get this cmd code to compile without errors/warning, what am i doing wrong?
i cant get this cmd code to compile without errors/warning, what am i doing wrong?
pawn Код:
COMMAND:getmission(playerid, params[]) //warning 209: function "cmd_getmission" should return a value
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInAnyVehicle(playerid))
{
if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 433)
{
if(ccargado[playerid] == 0 && enrep[playerid] == 0 && enload[playerid] == 0)
{
if(GetPlayerTeam(playerid) == 0)
enload[playerid] = 1;
SetPlayerCheckpoint(playerid,405.7452,2442.8865,16.5000,10);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Go to the red marker to load the truck");
}
if(GetPlayerTeam(playerid) == 1)
enload[playerid] = 1;
SetPlayerCheckpoint(playerid,1664.6863,1337.0352,10.7705,10);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Go to the red marker to load the truck");
}
if(GetPlayerTeam(playerid) == 2)
enload[playerid] = 1;
SetPlayerCheckpoint(playerid,1921.9943,-2235.5515,13.5469,10);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Go to the red marker to load the truck");
}
if(GetPlayerTeam(playerid) == 3)
enload[playerid] = 1;
SetPlayerCheckpoint(playerid,-1441.6310,-206.0983,6.0000,10);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Go to the red marker to load the truck");
}
else
{
SendClientMessage(playerid, COLOR_RED, "Your Truck is fully loaded!");
return 1;
}
}
else // error 010: invalid function or declaration
{
SendClientMessage(playerid, COLOR_RED, "You have to be the driver!");
return 1; // error 010: invalid function or declaration
}
}
else // error 010: invalid function or declaration
{
SendClientMessage(playerid, COLOR_RED, "You have to be in a delivery truck!");
return 1; // error 010: invalid function or declaration
}
}
else // error 010: invalid function or declaration
{
SendClientMessage(playerid, COLOR_RED, "You have to be in a Truck!");
return 1; // error 010: invalid function or declaration
}
}
return 1; // error 010: invalid function or declaration
}

