Quote:
Originally Posted by Boolean
pawn Код:
stock GetName(playerid) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); for(new i = 0; i < MAX_PLAYER_NAME; i++) { if(name[i] == '_') name[i] = ' '; } return name; }
// EXAMPLE
COMMAND:name(playerid, params[]) { new player, pMessage[100]; if(sscanf(params, "u", player)) return SendClientMessage(playerid, -1, "Parameters: /name (playerid)"); format(pMessage, sizeof(pMessage), "playername: %s", GetName(player)); SendClientMessage(playerid, -1, pMessage); format(pMessage, sizeof(pMessage), "%s just checked your name.", GetName(playerid)); SendClientMessage(player, -1, pMessage); return true; }
|
So I have to manually change all the "SenderName" and "giveplayername" and it's very long! How do I replace them maybe changing the GetPlayerName in GetPlayerRPName and I substitute the name only from GetPlayerName to GetPlayerRPName?