08.12.2011, 03:58
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
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;
}