help with string
#1



Код:
CMD:pm(playerid, params[])
{
    new str[124], str2[124], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
    if(sscanf(params, "us", id, str2))
    {
        SendClientMessage(playerid, 0xFF0000FF, "Usage: /pm [ID] [Mensage]");
        return 1;
    }
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Player not connected");
    if(playerid == id) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You cannot pm yourself!");
    {
        GetPlayerName(playerid, Name1, sizeof(Name1));
        GetPlayerName(id, Name2, sizeof(Name2));
        format(str, sizeof(str), ">PM Enviado a %s [ID: %d]: %s", Name2, id, str2);
        SendClientMessage(playerid, 0xFF0000FF, str);
        format(str, sizeof(str), "<PM Recivido de %s [ID: %d]: %s", Name1, playerid, str2);
        SendClientMessage(id, 0xFF0000FF, str);
    }
    return 1;
}
I mean its like:

/pm 12 Hey Hello! How are you dude, long time no see!

PM recived from Alex: Hey Hello! How are you du
Reply


Messages In This Thread
help with string - by Super_Panda - 05.12.2011, 22:24
Re: help with string - by grand.Theft.Otto - 05.12.2011, 23:20
Re: help with string - by -Rebel Son- - 05.12.2011, 23:45

Forum Jump:


Users browsing this thread: 1 Guest(s)