help me with this command
#5

%d in string used to get numbers %s used to get strings ( words and numbers ) and you miss to get player name.
PHP код:
CMD:trollban(playerid,params[])
{
if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_ERROR,"[ERROR]:You are not rcon admin");
new 
targetid,  str[75], name2[MAX_PLAYER_NAME];
if(
sscanf(params,"u",targetid)) return SendClientMessage(playerid,COLOR_ERROR,"Usage(playerid)");
GetPlayerName(targetid,name2,sizeof(name2));
format(str,sizeof(str),"(ADMIN BAN): An admin has banned %s",targetid);
SendClientMessageToAll(COLOR_ADMIN,str);
return 
1;

Reply


Messages In This Thread
help me with this command - by ahameed4755 - 09.10.2015, 19:46
Re: help me with this command - by perfectboy - 09.10.2015, 20:07
Re: help me with this command - by NoahF - 09.10.2015, 20:13
Re: help me with this command - by The God - 10.10.2015, 19:00
Re: help me with this command - by jlalt - 10.10.2015, 19:16
Re: help me with this command - by Stinged - 10.10.2015, 19:26
Re: help me with this command - by jlalt - 11.10.2015, 03:44
Re: help me with this command - by Kayla_Swade - 11.10.2015, 05:37

Forum Jump:


Users browsing this thread: 1 Guest(s)