how to get player name
#1

how to get player name and put it to this function

Quote:

ShowPlayerDialog(playerid, 11, 0,"Sergeant's Reinforcement","Good Day Sgt.[Player Name]

i want get player name and put it to dialog
like this

ShowPlayerDialog(playerid, 11, 0,"Sergeant's Reinforcement","Good Day Sgt.[Player Name]

pls tell me

im a newb
Reply
#2

See the example provided here

https://sampwiki.blast.hk/wiki/GetPlayerName

It has all you're asking for already written for you
Reply
#3

This thread might also help you:

String Formatting
Reply
#4

pawn Код:
new name[MAX_PLAYER_NAME], string[64 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "Good Day Sgt.%s", name);
    ShowPlayerDialog(playerid, 11, 0,"Sergeant's Reinforcement", string, "OK", "CANCEL");
If you can't make one format .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)