#1

Ok so i have a message to admin command thing but i need a little help:


PHP Code:
    new str[100];
    
format(strsizeof(str),"%s has used command /giveweapon on %d."ReturnPlayerName(playerid), playerid);
    
SendWarningToAdmins(COLOR_AMSGstr);
    return 
1
But it returns my playerid and not who i used the command on
Reply
#2

Why %d, just use %s.
and define it on new

PHP Code:
new str[100], pName[MAX_PLAYER_NAME], pName2[MAX_PLAYER_NAME];
GetPlayerName(playeridpNameMAX_PLAYER_NAME);
GetPlayerName(targetplayerpName2MAX_PLAYER_NAME);
format(strsizeof(str),"%s has used command /giveweapon on %s."pNamepName2);
SendWarningToAdmins(COLOR_AMSGstr);
return 
1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)