Don't understand ?
#3

Quote:
Originally Posted by Rafael_Zambrano
Посмотреть сообщение
pawn Код:
CMD:welcome(playerid, params[])
{
    if(isnull(params)) return SendClientMessage(playerid, -1, "Usage: /welcome < text >");
    new str[500];
    format(str, sizeof(str), " * %s %s", GetName(playerid), params);
    SendClientMessageToAll(0xCD3333, str);
    return 1;
}
this with this
I can tell you pulled this out of your GM/FS this code wont work for most people. He doesn't have GetName(playerid) so where did that come from?
And new str[500]; ?
No. just No.
Try this:
pawn Код:
CMD:welcome(playerid, params[])
{
    new string[128], msg[128], pname[MAX_PLAYER_NAME];
    if(sscanf(params,"s[128]",msg)) return SendClientMessage(playerid, 0xCD3333, "/welcome <text>");
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "*%s %s", pname, msg);
    SendClientMessageToAll(0xCD3333, string);
    return 1;
}
Reply


Messages In This Thread
Don't understand ? - by kaloqn54 - 27.07.2013, 02:25
Respuesta: Don't understand ? - by RafaelZam - 27.07.2013, 02:49
Re: Respuesta: Don't understand ? - by Deron_Green - 27.07.2013, 03:14
Re: Don't understand ? - by ToiletDuck - 27.07.2013, 05:51

Forum Jump:


Users browsing this thread: 1 Guest(s)