My command causes crash D: - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: My command causes crash D: (
/showthread.php?tid=127363)
My command causes crash D: -
biltong - 13.02.2010
pawn Код:
zcmd(lucasbag,playerid,params[])
{
if(IsPlayerLuxAdminLevel(playerid, 4))
{
lucasbagtimer = SetTimer("lucasbag",60000,false);
new AdminName[MAX_PLAYER_NAME];
GetPlayerName(playerid, AdminName, sizeof(AdminName));
new string[64];
format(string,sizeof(string),"~r~~Admin %s has launched Luca's bag on San Andreas! ETA: 60 seconds. THERE IS NO ESCAPE!~",AdminName);
GameTextForAll(string, 10000, 5);
return 1;
}
else return SendClientMessage(playerid,COLOR_RED,"ERROR:Only admins level 5 or above may use that command!");
}
public lucasbag()
{
SetWeather(19);
for(new players = 0; players <= MAX_PLAYERS; players++)
{
SetPlayerHealth(players, 0);
}
SetTimer("killlucasbag", 120000, false);
return 1;
}
public killlucasbagtimer()
{
SetWeather(0);
KillTimer(lucasbagtimer);
return 1;
}
What's causing it?
Oh, and if you're wondering why it's called lucasbag, thats because one of my friends at school has the biggest and heaviest bags you will ever see O_O
Re: My command causes crash D: -
[HiC]TheKiller - 13.02.2010
pawn Код:
format(string,sizeof(string),"~r~~Admin %s has launched Luca's bag on San Andreas! ETA: 60 seconds. THERE IS NO ESCAPE!~",AdminName);
Should be
pawn Код:
format(string,sizeof(string),"~r~Admin %s has launched Luca's bag on San Andreas! ETA: 60 seconds. THERE IS NO ESCAPE!",AdminName);
You had a extra
~.