When i try to Save Pawno Crashed. -
Thanks - 17.12.2016
Any Problem with this codes?
Код:
public Robdrag(playerid)
{
new rand = random(150000)+0; //When your robbing you get 0-150000 cash random
GivePlayerMoney(playerid,rand); //it Gives your the random cash
SendClientMessage(playerid, COLOR_GREEN, "You Rob the bank and now have 4 wanted level!"); //Gives you 3 wanted stars
TogglePlayerControllable(playerid,1); //You can walk again
return 1;
}
CMD:robdrag(playerid, params[]) //Command robbank
{
if(Robdrag[playerid] == 0 ) //Getting If Your not recently robbed the bank
if(IsPlayerInRangeOfPoint(playerid,2.0,1955.4669,1017.7850,992.4688)) //Gets your Pos.
{
SendClientMessage(playerid, COLOR_GREEN, "You robbing the bank 30 seconds left!"); //Sending a ClientMessage 30 sec left
Robdrag[playerid] = 1; // Give's your Recently Robbed
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+4); //Sets your wanted level to 3
SetTimerEx("Robdrag", 30000, false, "i", playerid); //Timer 1 Ticks when your robbing 30 seconds
SetTimerEx("after1", 50000, false, "i", playerid);
} else {
SendClientMessage(playerid, COLOR_RED, "[ERROR:]You are no in rob checkpoint!"); // Sends a SCM Your not on a Checkpoint.
}
return 1;
}
Re: When i try to Save Pawno Crashed. -
Bolex_ - 17.12.2016
Any warning/errors ?
Re: When i try to Save Pawno Crashed. -
Thanks - 17.12.2016
Are you not understand? I can't see the earrings or errors when I press F5 its crashed.... In thing its from public robdrag because when in remove it I got no erros
Re: When i try to Save Pawno Crashed. -
KNIGHT786 - 17.12.2016
change your pawno version to any latest version and then try to recompile
Re: When i try to Save Pawno Crashed. -
Nin9r - 17.12.2016
Did you change something in the other parts of code? Maybe you forgot to use a brace { or } somewhere.
Delete robdrag cmd and public and check if the pawno is still crashing.
Re: When i try to Save Pawno Crashed. -
Runn3R - 17.12.2016
pawn Код:
new rand = random(150000)+0; //When your robbing you get 0-150000 cash random
You are gonna get it anyways why the '+0'?
pawn Код:
CMD:robdrag(playerid, params[]) //Command robbank
{
if(Robdrag[playerid] == 0 ) //Getting If Your not recently robbed the bank
{
if(IsPlayerInRangeOfPoint(playerid,2.0,1955.4669,1017.7850,992.4688)) //Gets your Pos.
{
SendClientMessage(playerid, COLOR_GREEN, "You robbing the bank 30 seconds left!"); //Sending a ClientMessage 30 sec left
Robdrag[playerid] = 1; // Give's your Recently Robbed
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+4); //Sets your wanted level to 3
SetTimerEx("Robdrag", 30000, false, "i", playerid); //Timer 1 Ticks when your robbing 30 seconds
SetTimerEx("after1", 50000, false, "i", playerid);
}
else
{
SendClientMessage(playerid, COLOR_RED, "[ERROR:]You are no in rob checkpoint!"); // Sends a SCM Your not on a Checkpoint.
}
}
return 1;
}
You are missing the {} brackets.
And also define the timers into vars so you can kill them easily when a player disconnects.