SA-MP Forums Archive
timers - 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: timers (/showthread.php?tid=112148)



timers - KnooL - 05.12.2009

Well this is my command

pawn Код:
Command_(jail)
{
new string[128],
    time;
if (help)
{
Text_Send(playerid, "JAIL_HELP");
Text_SendFormat(playerid, "JAIL_HELP1", "jail");
}
if (PlayerInfo[player][Jailed] == 1)
{
Text_Send(playerid, "ALREADY_JAILED");
}
if(sscanf(params, "uiz", player, time, kbreason))
{
Text_Send(playerid, "JAIL_HELP");
Text_SendFormat(playerid, "JAIL_HELP1", "jail");
}
else if (!IsPlayerConnected(player))
{
Text_Send(playerid, "NOT_CONNECTED");
}
else
{
if (IsPlayerConnected(player))
{
SetTimerEx("JailGameText", 1000, 0, "isii", player, string, 5000, 3);
SetTimer("JailTime", time, 0);
format(string, sizeof(string), "You have %d time left in jail", time);
Text_SendFormat(player, "YOU_GOT_JAILED", ReturnPlayerName(playerid), playerid, time, kbreason);
PlayerInfo[player][Jailed] = 1;
SetPlayerInterior(playerid, 6);
SetPlayerPos(playerid, 264.3700,77.5700,1001.0391);
SetPlayerFacingAngle(playerid, 272.6900);
}
}
return 1;
}
And it is crashing the server when I do /jail 0 300 reason
when I do /jail 0 300 (it doesn't execute) it don't crash.
But I need to know the reason it crashes, can you help me out?
I need to know why it is crashing, thank you.