How to change Commands " ZCMD " To ...
#3

Quote:
Originally Posted by kalanerik99
Посмотреть сообщение
Under onplayercommand

PHP код:
if (strcmp("/tempban"cmdtexttrue10) == 0)
    {
    if(!
TempAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"You must be admin to use this command.");
    new 
days,rsn[24],id,name[24];
    if(
GetCurrentTempBanCount() == 24) return SendClientMessage(playerid,COLOR_RED,"Temp Ban Limit Reached.");
    if(
sscanf(params"uds[24]",id,days,rsn)) return SendClientMessage(playerid,COLOR_RED,"Usage: /tempban <PlayerID/Name> <Amount Of Days> <Reason>");
    new 
year,mon,d;
    
getdate(year,mon,d);
    new 
GetTempBanSlot();
    new 
aname[24];
    
GetPlayerName(playerid,aname,sizeof aname);
    
GetPlayerName(id,name,sizeof name);
    
format(TempBans[i][BannedName],sizeof name,"%s",name);
    
TempBans[i][BannedName] = name;
    
TempBans[i][UnbanDate] = d+days;
    new 
str[128];
    
GetPlayerName(id,name,sizeof name);
    
format(str,sizeof str,"%s (ID%d) has been temporary banned by Admin %s (ID:%d) (%s)",aname,playerid,name,id,rsn);
    
SendClientMessage(playerid,COLOR_RED,str);
    
Kick(id);
    return 
1;

LOL , if i make this i will get
pawn Код:
error 017: undefined symbol "params"
But thank you !

anyone know how ?
Reply


Messages In This Thread
How to change Commands " ZCMD " To ... - by morocco - 09.06.2013, 14:46
Re: How to change Commands " ZCMD " To ... - by kalanerik99 - 09.06.2013, 14:49
Re : Re: How to change Commands " ZCMD " To ... - by morocco - 09.06.2013, 15:05
Re: How to change Commands " ZCMD " To ... - by Aly - 09.06.2013, 15:28
Re : Re: How to change Commands " ZCMD " To ... - by morocco - 09.06.2013, 15:53
Re: How to change Commands " ZCMD " To ... - by Aly - 09.06.2013, 15:57

Forum Jump:


Users browsing this thread: 1 Guest(s)