05.12.2009, 21:21
Well this is my command
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.
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;
}
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.