sscanf2 problem.
#1

pawn Код:
CMD:es(playerid, params[])
{
    new ID,message[128],str[128],pname[MAX_PLAYER_NAME],reciever[MAX_PLAYER_NAME];
    if(sscanf(params,"us[256]",ID,message)) return SendClientMessage(playerid,COLOR_RED,""KASUTUS" /es <playername/id> <sхnum>");
    if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"ERROR: Vale kasutaja!");
    if(ID == playerid) return SendClientMessage(playerid,COLOR_RED,"ERROR: Sa ei saa iseendale erasхnumit saata!");
    GetPlayerName(ID,reciever,sizeof(reciever));
    GetPlayerName(playerid,pname,sizeof(pname));
    if(togglepm[ID] == 0)
    {
       format(str,sizeof(str),"%s proovis sulle saata "KOLLANE"erasхnumit.",pname);
       SendClientMessage(ID,COLOR_RED,str);
       return SendClientMessage(playerid,COLOR_RED,"ERROR: Sellel kasutajal on erasхnumid vдlja lьlitatud.");
    }
    format(str,sizeof(str),"-> %s(ID:%d): %s",reciever,ID,message);
    SendClientMessage(playerid,COLOR_YELLOW,str);
    format(str,sizeof(str),"%s(ID:%d) <-: %s",pname,playerid,message);
    SendClientMessage(ID,COLOR_YELLOW,str);
    PlayerPlaySound(ID,1085,0,0,0);
    return 1;
}
Who ever i try to write to, or tries to write back to me, it always says Vale kasutaja.
Reply


Messages In This Thread
sscanf2 problem. - by vent - 11.01.2012, 18:54
Re: sscanf2 problem. - by Psymetrix - 11.01.2012, 18:55
Re: sscanf2 problem. - by vent - 12.01.2012, 11:09

Forum Jump:


Users browsing this thread: 1 Guest(s)