warnings
#2

Код:
 CMD:hi(playerid,params[])
{
    new player1,string[128];
    if(sscanf(params, "i",player1)) return SendClientMessage(playerid, 0xFF0000FF,"/hi [Player id]");


    format(string,sizeof(string),"%s Says Hi To %s", ReturnName(playerid),ReturnName(player1));
    SCMTA(COLOR_GREEN,string);
    return 1;
}

CMD:wb(playerid,params[])
{
    new Player1,string[128];
    if(sscanf(params,"i",Player1)) return SendClientMessage(playerid, 0xFF0000FF, "/wb [Player id]");
    
    format(string,sizeof(string),"Welcome Back \"%s\" (From: %s)",ReturnName(Player1),ReturnName(playerid));
    SCMTA(COLOR_GREEN,string);
    return 1;
}
Place this function in the end of the fs / gm, but not above that commands
Код:
stock ReturnName(playerid)
{
    new name[MAX_PLAYER_NAME];
   GetPlayerName(playerid,name,sizeof(name));
  return name;
}
The problem was that you didn not used the entire arguments of GetPlayerName function
Do not use GetPlayerName(playerid);
correct is GetPlayerName(playerid,string,sizeof(string)); ///you can define string with whatever you want example under

Код:
     new name[MAX_PLAYER_NAME], string[256];
    GetPlayerName(playerid,name,sizeof(name));
   format(string,sizeof(string),"Hello %s",name);
  SMT(-1,string);
Reply


Messages In This Thread
warnings - by Windrush - 16.12.2012, 10:58
Re: warnings - by XStormiest - 16.12.2012, 11:02
Re: warnings - by Konstantinos - 16.12.2012, 11:03
Re: warnings - by XStormiest - 16.12.2012, 11:07
Re: warnings - by gtakillerIV - 16.12.2012, 11:08
Re: warnings - by Konstantinos - 16.12.2012, 11:11
Re: warnings - by XStormiest - 16.12.2012, 11:17

Forum Jump:


Users browsing this thread: 1 Guest(s)