code..
#4

pawn Код:
CMD:country(playerid,params[])
{
    new player1, string[128],dsname[MAX_PLAYER_NAME];
    if(sscanf(params,"i",player1)) return SendClientMessage(playerid, red, "USAGE: /Country [playerid]");
    GetPlayerName(player1, dsname, sizeof(dsname));
    format(string, sizeof(string), "** %s [ID: %s] Country: %s", dsname,player1,GetPlayerCountryName(player1));
    SendClientMessage(playerid,green, string);
    return 1;
}

pawn Код:
GetPlayerName(playerid, dsname, sizeof(dsname));
You use GetPlayerName with playerid. playerid is the player who uses the command. So it will never effect other players. You have to use the sscanf params.

It's what ****** told you, but i guess you didn't understand.
Reply


Messages In This Thread
code.. - by RBTDM - 14.11.2011, 16:26
Re: code.. - by RBTDM - 14.11.2011, 16:32
Re: code.. - by RBTDM - 14.11.2011, 16:47
Re: code.. - by Unte99 - 14.11.2011, 16:48
Re: code.. - by RBTDM - 14.11.2011, 16:54
Re: code.. - by Unte99 - 14.11.2011, 16:58
Re: code.. - by RBTDM - 14.11.2011, 17:05
Re: code.. - by Unte99 - 14.11.2011, 17:10
Re: code.. - by RBTDM - 14.11.2011, 17:11
Re: code.. - by Unte99 - 14.11.2011, 17:16

Forum Jump:


Users browsing this thread: 1 Guest(s)