[HELP] Team Random Spawning
#1

Hey,

i am currently attempting to script a Cops And Robbers script that i want to release i have added random spawns but how can i change it so that civilians won't spawn at the police station or vis versa also i need some help with my medic team how can i make it so that medics can heal other players? please help thanks
Reply
#2

pawn Код:
if(gTeam[playerid] == TEAM_COP)
?
Reply
#3

where to add that ? before the random spawn ?
Reply
#4

Under OnPlayerSpawn
Reply
#5

and no it didnt work i get errors

PHP код:
    if(gTeam[playerid] == TEAM_POLICE)
}
new 
Float:RandomSpawns[][] =
{
    {
1249.7258, -2047.926359.920990.2055}, // Randomspawn
    
{1241.2084, -2057.652160.019094.9352}, // Randomspawn
    
{1241.0105, -2052.687359.99752.8144}, // Randomspawn
    
{718.4906, -1477.30245.4688357.9947}, // Randomspawn
    
{722.3772, -1477.28565.4688272.3814// Randomspawn
};//random spawns 
Код:
C:\Users\......\Desktop\Fas FreeRoam\gamemodes\LSCNR.pwn(29) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#6

What Are the errors?
Reply
#7

010: invalid function or declaration
Reply
#8

pawn Код:
public OnPlayerSpawn(playerid)
{
   if(gTeam[playerid] == TEAM_COP)
{
    new Random = random(sizeof(RandomSpawns));
    SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
   
}
    return 1;
}
Reply
#9

Код:
C:\Users\Unlimited DMers\Desktop\Fas FreeRoam\gamemodes\LSCNR.pwn(100) : error 017: undefined symbol "gTeam"
C:\Users\Unlimited DMers\Desktop\Fas FreeRoam\gamemodes\LSCNR.pwn(100) : warning 215: expression has no effect
C:\Users\Unlimited DMers\Desktop\Fas FreeRoam\gamemodes\LSCNR.pwn(100) : error 001: expected token: ";", but found "]"
C:\Users\Unlimited DMers\Desktop\Fas FreeRoam\gamemodes\LSCNR.pwn(100) : error 029: invalid expression, assumed zero
C:\Users\Unlimited DMers\Desktop\Fas FreeRoam\gamemodes\LSCNR.pwn(100) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)