10.05.2015, 12:31
Hello, i have problem when any admin is make /spec , and he /slap players, server is restart auto
Code:
Code:
pawn Код:
CMD:slap(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_WHITE, "You need to login first.");
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)
{
new string[64],giveplayer[25],sendername[25],id;
if(sscanf(params, "u",id)) return SCM(playerid,0xCECECEFF, "Syntax:{FFFFFF} /slap <Name/Playerid>");
new Float:shealth;
new Float:slx, Float:sly, Float:slz;
if(IsPlayerConnected(id))
{
GetPlayerName(id, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerHealthEx(id, shealth);
SetPlayerHealthEx(id, shealth-5);
GetPlayerPos(id, slx, sly, slz);
SetPlayerPos(id, slx, sly, slz+5);
format(string, 256, "{FF0000}AdmInfo: {FFFFFF}Admin/Helper %s slap %s.", sendername,giveplayer);
ABroadCast(COLOR_WHITE,string,1);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected.");
}
}
else return SendClientMessage(playerid, COLOR_WHITE,"{5CAD5C}Error: Your admin/helper");
}
return 1;
}