Restricted Class Spawning Help
#1

Ok i need CLASS_MERC to be restricted to 100+ score..

I have this..

Код:
public OnPlayerRequestSpawn(playerid)
{
        if(gTeam[playerid] == CLASS_MERC)
		if(GetPlayerScore(playerid) >= 100);
		return 1;
}
Please wat do i gota do its killing me xD i get this error but i know its unfinished anyway..

Код:
C:\Users\Weponz\Desktop\Server Files\gamemodes\M-SAIF.pwn(65) : error 036: empty statement
Pawn compiler 3.2.3664              Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

You have a statement doing nothing...what do you want to do? Disallow someone to spawn after reaching 100 score on that team? Then like so:

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(gTeam[playerid] == CLASS_MERC)
    {
        if(GetPlayerScore(playerid) >= 100) return 0;
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by JaTochNietDan
Посмотреть сообщение
You have a statement doing nothing...what do you want to do? Disallow someone to spawn after reaching 100 score on that team? Then like so:

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(gTeam[playerid] == CLASS_MERC)
    {
        if(GetPlayerScore(playerid) >= 100) return 0;
    }
    return 1;
}
No sorry i dont want them to be able to spawn as that team unless thay have 100 score or more..

EDIT:

maybe like this?

Код:
public OnPlayerRequestSpawn(playerid)
{
    if(gTeam[playerid] == CLASS_MERC)
    {
        if(GetPlayerScore(playerid) >= 100) return 1;
    }
    return 1;
}
Reply
#4

Okay, then you can just make a slight modification:

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(gTeam[playerid] == CLASS_MERC)
    {
        if(GetPlayerScore(playerid) < 100) return 0; // If their score is less than 100, return 0, which means they won't spawn
    }
    return 1;
}
Reply
#5

Quote:
Originally Posted by JaTochNietDan
Посмотреть сообщение
Okay, then you can just make a slight modification:

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(gTeam[playerid] == CLASS_MERC)
    {
        if(GetPlayerScore(playerid) < 100) return 0; // If their score is less than 100, return 0, which means they won't spawn
    }
    return 1;
}
EDIT:I completly see now thanks for the tips
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)