/ajail Help
#1

PHP код:
CMD:ajail(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] > 0)
    {
        new 
name[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME],string[128],id,reason[64],time;
        if(
sscanf(params,"ds[64]",id,time,reason)) return SendClientMessage(playerid,GRAY,"CMD: /ajail <playerid> <minutes> <reason>");
        
GetPlayerName(playerid,namesizeof(name));
        
GetPlayerName(id,name2sizeof(name2));
        if(!
IsPlayerConnected(id)) return SendClientMessage(playeridGRAY,"CMD: Invalid playerid.");
        
format(stringsizeof(string), "Administrator %s admin jailed %s %s minutes for %s."name,name2,time,reason);
        
SendClientMessageToAll(PINK,string);
        
SetPlayerPos(id,-1425.1499,1490.4562,1.8672);
    } 
// Administrator Noles2197 admin jailed Noles2197  minutes for 60 dm."
    
return 1;

appears as "Administrator Noles2197 admin jailed Noles2197 minutes for 60 dm."
The time and reason seem to be getting mixed up and I think it has something to do with..
"if(sscanf(params,"ds[64]",id,time,reason)) return SendClientMessage(playerid,GRAY,"CMD: /ajail <playerid> <minutes> <reason>");"
Reply


Messages In This Thread
/ajail Help - by Noles2197 - 20.01.2013, 20:07
Re: /ajail Help - by Chenko - 20.01.2013, 20:11

Forum Jump:


Users browsing this thread: 1 Guest(s)