29.08.2011, 08:25
Hello. I made this simple command :
No errors when compiling, but when I enter in game and tipe /cashbox as admin nothing happens.
And the cashbox mission exists look :
pawn Код:
if(strcmp(cmd,"/cashbox",true)==0)
{
if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 105)
{
MissionActive = 1;
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use this command.");
}
return 1;
}
And the cashbox mission exists look :
pawn Код:
public OnGameModeMission()
{ if(pdebug == 1){print("[DEBUG] OnGameModeMission()");}
new string[128];
if(MissionActive == 1)
{
if(PlayerIsDoingMission == INVALID_PLAYER_ID)
{
ResetMissions();
new rcashbox;
if(city == 1){rcashbox = random(sizeof(RandomFindCashbox_LS));}
RandomCashboxMissionMoney = MinCashboxMissionMoney+random(MaxCashboxMissionMoney-MinCashboxMissionMoney);
if(city == 1){format(string, sizeof(string), "** Mission: Cashbox **: Find the cashbox at %s! Worth: %d$", RandomFindCashboxName_LS[rcashbox][0], RandomCashboxMissionMoney);
SendClientMessageToAll(COLOR_YELLOW, string);
}
new Float:ratio = 4.0;
for(new i=0; i<MAX_SLOTS; i++)
{
if(city == 1){SetPlayerCheckpoint(i, RandomFindCashbox_LS[rcashbox][0], RandomFindCashbox_LS[rcashbox][1], RandomFindCashbox_LS[rcashbox][2], ratio);}
}
if(city == 1){
CheckpointBusyX = RandomFindCashbox_LS[rcashbox][0];
CheckpointBusyY = RandomFindCashbox_LS[rcashbox][1];
CheckpointBusyZ = RandomFindCashbox_LS[rcashbox][2];
AllPlaySound(1139);
}
}
}