Need Help with GivePlayerWeapon
#7

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.
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);
}
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.
pawn Код:
printf("Player ID %d has spawned!",playerid);
You might want to use this.
pawn Код:
new string[70], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
printf("Player %s [%d] has spawned!", pName, playerid);
Reply


Messages In This Thread
Need Help with GivePlayerWeapon - by Tigerbeast11 - 11.10.2009, 09:01
Re: Need Help with GivePlayerWeapon - by Abernethy - 11.10.2009, 09:05
Re: Need Help with GivePlayerWeapon - by boelie - 11.10.2009, 09:07
Re: Need Help with GivePlayerWeapon - by Tigerbeast11 - 11.10.2009, 09:09
Re: Need Help with GivePlayerWeapon - by usa.vs.iraq - 11.10.2009, 09:09
Re: Need Help with GivePlayerWeapon - by usa.vs.iraq - 11.10.2009, 09:10
Re: Need Help with GivePlayerWeapon - by Abernethy - 11.10.2009, 09:11
Re: Need Help with GivePlayerWeapon - by Tigerbeast11 - 11.10.2009, 09:13
Re: Need Help with GivePlayerWeapon - by Abernethy - 11.10.2009, 09:20
Re: Need Help with GivePlayerWeapon - by Tigerbeast11 - 11.10.2009, 09:29

Forum Jump:


Users browsing this thread: 2 Guest(s)