21.02.2013, 17:38
Код:
[22:56:13] [debug] Server crashed while executing TGP.amx [22:56:13] [debug] AMX backtrace: [22:56:13] [debug] #0 00000075 in ?? () from TGP.amx [22:56:13] [debug] #1 000bfd5c in ?? () from TGP.amx [22:56:13] [debug] #2 00000075 in public cmd_ant () from TGP.amx [22:56:13] [debug] #3 native CallLocalFunction () [080d2870] from samp03svr [22:56:13] [debug] #4 0000131c in public OnPlayerCommandText () from TGP.amx [22:56:13] [debug] System backtrace:
pawn Код:
CMD:ant(playerid, params[])
{
if(playerDB[playerid][darbas]!=1) return 0;
new
vardas[MAX_PLAYER_NAME],
msg[64],
policeman[MAX_PLAYER_NAME],
name[MAX_PLAYER_NAME]
;
if( sscanf( params,"z",vardas ) ) return SendClientMessage(playerid,Zalia, "{00CC00}Surakinti ћaidėją: {FF0000}/ant [Vardas_Pavadė]");
new id = GetPlayeridMid(vardas);
if(id == INVALID_PLAYER_ID) return InfoBoxForPlayer(playerid, "~r~Tokio zaidejo nera");
if(id == playerid) return InfoBoxForPlayer(playerid, "~r~Saves surankiti negalite");
new Float:poz[3];
GetPlayerPos(id, poz[0], poz[1], poz[2]);
if(!PlayerToPoint(3, playerid, poz[0],poz[1],poz[2])) return InfoBoxForPlayer(playerid, "~r~Zaidejas per toli");
GetPlayerName(playerid,policeman,sizeof(policeman));
GetPlayerName(id,name,sizeof(name));
if(playerDB[id][surakintas])
{
playerDB[id][surakintas]=false;
TogglePlayerControllable(id,true);
RemovePlayerAttachedObject(id,0);
SetPlayerSpecialAction(id,SPECIAL_ACTION_NONE);
format(msg,sizeof(msg),"{FFD400}Paleidote {DC00FF}%s.",name);
SendClientMessage(playerid,Raudona,msg);
format(msg,sizeof(msg),"{FFD400}Jus paleido {DC00FF}%s.",policeman);
SendClientMessage(id,Raudona,msg);
}
else
{
playerDB[id][surakintas]=true;
TogglePlayerControllable(id,false);
SetPlayerSpecialAction(id, SPECIAL_ACTION_CUFFED );
SetPlayerAttachedObject(id,0,19418,5,0.016000,0.032000,0.025000,17.500005,-10.099991,-48.099990,1.0,1.0,1.0 );
format(msg,sizeof(msg),"{FFD400}Surakinote {DC00FF}%s.",name);
SendClientMessage(playerid,Raudona,msg);
format(msg,sizeof(msg),"{FFD400}Jus surakino {DC00FF}%s.",policeman);
SendClientMessage(id,Raudona,msg);
}
return 1;
}