Pawno [SOLVED] - 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 [SOLVED] (
/showthread.php?tid=379125)
Pawno [SOLVED] -
CrazyChoco - 20.09.2012
Hai, When i try to add a little bit of code the Pawno compiler crashes, and when i dont have that little code, i will compile fine My code is
pawn Код:
if(IsCopBan[playerid] == 0)
if(gTeam[playerid] == TEAM_COPS)
{
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 22, 500);
GivePlayerWeapon(playerid, 25, 400);
GivePlayerWeapon(playerid, 29, 250);
}
return 1;
}
if(IsCopBan[playerid] == 1)
{
SendClientMessage(playerid, -1, "{FF0000}[ATTENTION]{FFFFFF}: You are currently {FF0000}Cop Banned{FFFFFF} and can currently not use this class");
ForceClassSelection(playerid);
TogglePlayerSpectating(playerid, true);
TogglePlayerSpectating(playerid, false);
return 1;
}
and i putted it onplayerspawn, but when i run the compiling, it crashes
Re: Pawno -
RedJohn - 20.09.2012
pawn Код:
if(IsCopBan[playerid] == 0)
{
if(gTeam[playerid] == TEAM_COPS)
{
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 22, 500);
GivePlayerWeapon(playerid, 25, 400);
GivePlayerWeapon(playerid, 29, 250);
}
return 1;
}
if(IsCopBan[playerid] == 1)
{
SendClientMessage(playerid, -1, "{FF0000}[ATTENTION]{FFFFFF}: You are currently {FF0000}Cop Banned{FFFFFF} and can currently not use this class");
ForceClassSelection(playerid);
TogglePlayerSpectating(playerid, true);
TogglePlayerSpectating(playerid, false);
return 1;
}
Re: Pawno -
CrazyChoco - 20.09.2012
Thanks
Re: Pawno [SOLVED] -
Kyle - 20.09.2012
Always check for missing brackets.