11.10.2009, 09:11
Uh, GivePlayerWeapon has no limits. AddClassSelection is the function that has a limit to three weapons. I guess that is what you were refering too.
Try this.
By the way
Why use this, it is only going to print their ID, no way to tell who that player is in the server logs.
You might want to use this.
Try this.
pawn Код:
forward KillingSpree3(playerid);
forward KillingSpree10(playerid);
public KillingSpree3(playerid)
{
if(GetPlayerScore(playerid) >= 3)
{
new PlayerName[MAX_PLAYER_NAME],
string[128];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "[Spree] %s is now on a killing spree!", PlayerName);
}
SendClientMessageToAll(COLOR_GREEN, string);
}
public KillingSpree10(playerid)
{
if(GetPlayerScore(playerid) >= 10)
{
new PlayerName[MAX_PLAYER_NAME],
string[128];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "[Spree] %s has been awarded a Minigun! Stop him before he damages the whole place!", PlayerName);
GivePlayerWeapon(playerid, 362, 3000);
}
SendClientMessageToAll(COLOR_GREEN, string);
}
Why use this, it is only going to print their ID, no way to tell who that player is in the server logs.
pawn Код:
printf("Player ID %d has spawned!",playerid);
pawn Код:
new string[70], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
printf("Player %s [%d] has spawned!", pName, playerid);