RCON:sscanf warning
#4

Sorry
pawn Код:
CMD:pm(playerid,params[])
{
    new id;
    new string[256];
    new pName[MAX_PLAYER_NAME];
    new pName2[MAX_PLAYER_NAME];
    if(sscanf(params,"us[128]",id)) return SendClientMessage(playerid,COLOR_YELLOW,"Usage:/pm [ID] [Text]");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"Player ID Doesn't Exist");
    {
        GetPlayerName(playerid,pName,sizeof(pName));
        GetPlayerName(id,pName2,sizeof(pName2));
        format(string,sizeof(string),"Private Message Recived From: [%s]: %s",pName,params);
        SendClientMessage(id,COLOR_YELLOW,string);
        format(string,sizeof(string),"Private Message Sent To: [%s]: %s",pName2,params);
        SendClientMessage(playerid,COLOR_YELLOW,string);
        format(string,sizeof(string),"%s wrote a private message to: %s! Text: %s ",pName,pName2,params);
        Log("logs/PMLog.log",string);
    }
    return 1;
}
Reply


Messages In This Thread
RCON:sscanf warning - by dannyk0ed - 14.05.2012, 14:53
Re: RCON:sscanf warning - by AlTy - 14.05.2012, 14:54
Re: RCON:sscanf warning - by ViniBorn - 14.05.2012, 15:58
Re: RCON:sscanf warning - by dannyk0ed - 14.05.2012, 22:04
Re: RCON:sscanf warning - by Jonny5 - 14.05.2012, 22:06

Forum Jump:


Users browsing this thread: 2 Guest(s)