12.09.2014, 23:58
Hi guys, my first tutorial xD
Than wee need too check if is player admin!
Then
and if u dont have GetName
As i said this is my first tutorial, im scripting about 3 months so please if i did something wrong in this command reply to mee.
and sorry for bad english
EDIT:Sorry add this on bottom of the command
Код:
Indlude #include < a_samp > #include < zcmd > #include < sscanf2 >
Код:
if(PlayerInfo[playerid][pAdmin] >= 1)
Код:
{ new id,string[128];//'ID' is player who wee are going to kill if(sscanf(params, "u", id)) return SCM(playerid, -1, "Error:/kill [ID/Name]"); if(!IsPlayerConnected(id)) return SCM(playerid, -1, "Error: Wrong ID!");//if player types wrong ID/name SetPlayerHealth(id,0); //we must use 'id' here or u are going to kill yourself :D format(string,sizeof(string),"Admin %s killed u!",GetName(playerid));//sends message to player! SCM(id,-1,string); format(string,sizeof(string),"You killed player %s!",GetName(pplayerid)); //sends message to admin who killed player SCM(playerid,-1,string); }
Код:
stock GetName(playerid) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); return name; }
and sorry for bad english
EDIT:Sorry add this on bottom of the command
Код:
else { SCM(playerid, -1, "Only Admins!"); }