Restricted Class Spawning Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Restricted Class Spawning Help (
/showthread.php?tid=185351)
Restricted Class Spawning Help -
<Weponz> - 24.10.2010
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.
Re: Restricted Class Spawning Help -
JaTochNietDan - 24.10.2010
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;
}
Re: Restricted Class Spawning Help -
<Weponz> - 24.10.2010
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;
}
Re: Restricted Class Spawning Help -
JaTochNietDan - 24.10.2010
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;
}
Re: Restricted Class Spawning Help -
<Weponz> - 24.10.2010
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