How to get name from score
#1

hi all i am trying to make it that when a player gets a score of say 100 it lets all players on the server know that player [name] is now part of the ministry say the important bit is getting it so the player gets there name in it using the %s stuff but i think i have gone totally wrong and if anyone can fix it so it works but also explain what to do it wud be great

so basically as soon as a player reaches 100 score it says to all players such abiody is now part of the ministry



pawn Код:
//===============================================Rank Bonus======================================================//
forward Bonus(playerid);
public Bonus(playerid)
{
    if(GetPlayerScore(playerid) >= 500)//General of the army
    {
   
   
    new szPlayerName[MAX_PLAYER_NAME], szMessage[74];
GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);

format(szMessage, sizeof(szMessage), "%s is now a member of the ministry ", szPlayerName);
SendClientMessageToAll(0xff0000FF, szMessage);  // Replace 0 with the colour
}
    GivePlayerMoney(playerid, 500000);//[EDITABLE]
    return 1;
    }
Reply


Messages In This Thread
How to get name from score - by [LHT]Bally - 08.12.2011, 03:58
Re: How to get name from score - by THE_KNOWN - 08.12.2011, 04:34
Re: How to get name from score - by [ABK]Antonio - 08.12.2011, 06:02
Re: How to get name from score - by Rob_Maate - 08.12.2011, 07:41

Forum Jump:


Users browsing this thread: 2 Guest(s)