sscanf text invisible
#2

you formatted the "string" variable, not the string2, "string" variable is supposed to represent be the string parameter in the command, and string2 is supposed to be the final string to send to the player desired.

Код:
CMD:pm(playerid, params[]) 
{ 
    new cibleid, string[128], pName[MAX_PLAYER_NAME], string2[128]; 
    if(sscanf(params, "us", cibleid, string)) return SendClientMessage(playerid, COULEUR_ROUGE,"Usage: /pm [id] [message]"); 
    if(!IsPlayerConnected(cibleid)) return SendClientMessage(playerid, COULEUR_ROUGE,"[ERROR] This Player is not connected"); 
    GetPlayerName(playerid, pName, sizeof(pName)); 
    format(string2, sizeof(string2), "PM of %s: %s", pName, string); 
    SendClientMessage(cibleid, COULEUR_JAUNE, string2); 
    SendClientMessage(playerid, COULEUR_BLEUCLAIR ,"Message envoyйe."); 
    return 1; 
}
Reply


Messages In This Thread
sscanf text invisible - by Eymeric69 - 05.07.2016, 18:19
Re: sscanf text invisible - by Sawalha - 05.07.2016, 18:37
Re: sscanf text invisible - by Eymeric69 - 05.07.2016, 18:42
Re: sscanf text invisible - by Konstantinos - 05.07.2016, 18:57

Forum Jump:


Users browsing this thread: 1 Guest(s)