Invalid Function or Declaration HELP.
#1

if(GetPlayerScore(playerid) >= 10) && (GetPlayerHealth(playerid) >0))
{
SetPlayerArmour(playerid, 10);
SendClientMessage(playerid, DeathColor, "You gain 10 armour on spawn because of your level.");
}


I have this under OnPlayerSpawn btw.


Tell me what i'm doing wrong and then feel free to insult my intelligence.

C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\bryanworldv2.pwn(89) : error 010: invalid function or declaration
Reply
#2

PHP код:
if(GetPlayerScore(playerid) >= 10 && GetPlayerHealth(playerid) >0
Reply
#3

That didn't work sadly.
Reply
#4

pawn Код:
new Float:Health;
GetPlayerHealth(playerid, Health);
if((GetPlayerScore(playerid) >= 10) && (Health > 0.0))
{
    SetPlayerArmour(playerid, 10);
    SendClientMessage(playerid, DeathColor, "You gain 10 armour on spawn because of your level.");
}
But why are you checking if the player is not dead at OnPlayerSpawn? Players are always alive when they spawn.
Reply
#5

PHP код:
new score GetPlayerScore(playerid);
new 
Float:Health;
new 
health GetPlayerHealth(playerid);
if(
score >= 10 && health >0)
{
SetPlayerArmour(playerid10);
SendClientMessage(playeridDeathColor"You gain 10 armour on spawn because of your level.");

Edit: -_-.
Reply
#6

>Schneider, forgot to remove it when I had it on death.
Reply
#7

Nezo, that literally made the compiler crash.
Reply
#8

Neither of these work.
Reply
#9

pawn Код:
if(GetPlayerScore(playerid) >= 10)
{
    SetPlayerArmour(playerid, 10);
    SendClientMessage(playerid, DeathColor, "You gain 10 armour on spawn because of your level.");
}
Reply
#10

Код:
public OnPlayerSpawn(playerid)
    if(GetPlayerTeam(playerid) == Bloods)
    {
        SetPlayerColor(playerid, BloodsColor); // Set his color to the BloodsColor (Red)
           /* Any other bonus' you want to add to the Bloods team add it here. */
    }

    else if(GetPlayerTeam(playerid) ==Crips)
    {
        SetPlayerColor(playerid, CripsColor);  // Same as above but in this case, CripsColor (Blue)
           /* Any other bonus' you want to add to the Crips team add it here. */
	}

 	if(GetPlayerScore(playerid) >= 10)
	{
    SetPlayerArmour(playerid, 10);
    SendClientMessage(playerid, DeathColor, "You gain 10 armour on spawn because of your level.");
	}
}
Here is the full OnPlayerSpawn part, it's still not working.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)