Pawno Crashes - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Pawno Crashes (
/showthread.php?tid=392378)
Pawno Crashes -
goviscrap - 14.11.2012
Why does my Pawno Crash when i use this Script?
Код:
if(strcmp(cmd, "/robbank", true) == 0)//Alexander
{
if(IsPlayerConnected(playerid))
{
if(robbing[playerid] == 1)
{
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+6);
SendClientMessage(playerid, COLOR_GREY, " You are already robbing the bank + 6 level wanted, please slow down");
return 1;
}
if(alreadyrobbed[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "You already robbed the bank! Wait 1 hour.");
return 1;
}
if(!IsPlayerInRangeOfPoint(playerid, 5.0, 1439.4030,-986.7344,14.2183))//Change those X,Y,Z
{
SendClientMessage(playerid, COLOR_GREY, " You are not at the bank !");
return 1;
}
SetTimer("Startbankrobbery", 20000, 0);
return 1;
}
public startbankrobbery()
{
SendClientMessage(playerid, COLOR_WHITE, "You have Robbed Los Santos Local Bank And Stole 1 Million Dollar - Stay low From Cops for few");
robbing[playerid] = 1;
GivePlayerMoney(playerid, 1000000);
SendClientMessageToAll(COLOR_LIGHTBLUE, "||----------------Latest News----------------||");
SendClientMessageToAll(COLOR_GREEN, " Los Santos Local Bank Trust has Been Broken.");
SendClientMessageToAll(COLOR_GREEN, " The Bank is Currentley getting Robbed. ");
SendClientMessageToAll(COLOR_GREEN, " We will report more once we get more information");
SendClientMessageToAll(COLOR_LIGHTBLUE, "||----------------Latest News----------------||");
}
SetTimer("endbankrobbery", 240000, 0);
}
}
return 1;
}
+rep for the one who helps me
Re: Pawno Crashes -
Kreyg - 14.11.2012
Missing Brackets
pawn Код:
if(strcmp(cmd, "/robbank", true) == 0)//Alexander
{
if(IsPlayerConnected(playerid))
{
if(robbing[playerid] == 1)
{
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+6);
SendClientMessage(playerid, COLOR_GREY, " You are already robbing the bank + 6 level wanted, please slow down");
return 1;
}
if(alreadyrobbed[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "You already robbed the bank! Wait 1 hour.");
return 1;
}
if(!IsPlayerInRangeOfPoint(playerid, 5.0, 1439.4030,-986.7344,14.2183))//Change those X,Y,Z
{
SendClientMessage(playerid, COLOR_GREY, " You are not at the bank !");
return 1;
}
SetTimer("Startbankrobbery", 20000, 0);
return 1;
}
}
public startbankrobbery()
{
SendClientMessage(playerid, COLOR_WHITE, "You have Robbed Los Santos Local Bank And Stole 1 Million Dollar - Stay low From Cops for few");
robbing[playerid] = 1;
GivePlayerMoney(playerid, 1000000);
SendClientMessageToAll(COLOR_LIGHTBLUE, "||----------------Latest News----------------||");
SendClientMessageToAll(COLOR_GREEN, " Los Santos Local Bank Trust has Been Broken.");
SendClientMessageToAll(COLOR_GREEN, " The Bank is Currentley getting Robbed. ");
SendClientMessageToAll(COLOR_GREEN, " We will report more once we get more information");
SendClientMessageToAll(COLOR_LIGHTBLUE, "||----------------Latest News----------------||");
SetTimer("endbankrobbery", 240000, 0);
return 1;
}
Re: Pawno Crashes -
Plovix - 14.11.2012
Try this:
PHP код:
if(strcmp(cmd, "/robbank", true) == 0)//Alexander
{
if(IsPlayerConnected(playerid))
{
if(robbing[playerid] == 1)
{
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+6);
SendClientMessage(playerid, COLOR_GREY, " You are already robbing the bank + 6 level wanted, please slow down");
return 1;
}
if(alreadyrobbed[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "You already robbed the bank! Wait 1 hour.");
return 1;
}
if(!IsPlayerInRangeOfPoint(playerid, 5.0, 1439.4030,-986.7344,14.2183))//Change those X,Y,Z
{
SendClientMessage(playerid, COLOR_GREY, " You are not at the bank !");
return 1;
}
SetTimer("Startbankrobbery", 20000, 0);
return 1;
}
public startbankrobbery(playerid)
{
SendClientMessage(playerid, COLOR_WHITE, "You have Robbed Los Santos Local Bank And Stole 1 Million Dollar - Stay low From Cops for few");
robbing[playerid] = 1;
GivePlayerMoney(playerid, 1000000);
SendClientMessageToAll(COLOR_LIGHTBLUE, "||----------------Latest News----------------||");
SendClientMessageToAll(COLOR_GREEN, " Los Santos Local Bank Trust has Been Broken.");
SendClientMessageToAll(COLOR_GREEN, " The Bank is Currentley getting Robbed. ");
SendClientMessageToAll(COLOR_GREEN, " We will report more once we get more information");
SendClientMessageToAll(COLOR_LIGHTBLUE, "||----------------Latest News----------------||");
SetTimer("endbankrobbery", 240000, 0);
}