[HELP] Team Random Spawning - 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)
+--- Thread: [HELP] Team Random Spawning (
/showthread.php?tid=288407)
[HELP] Team Random Spawning -
DaRkAnGeL[NBK] - 07.10.2011
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
Re: [HELP] Team Random Spawning -
CSSI - 07.10.2011
pawn Код:
if(gTeam[playerid] == TEAM_COP)
?
Re: [HELP] Team Random Spawning -
DaRkAnGeL[NBK] - 07.10.2011
where to add that ? before the random spawn ?
Re: [HELP] Team Random Spawning -
CSSI - 07.10.2011
Under OnPlayerSpawn
Re: [HELP] Team Random Spawning -
DaRkAnGeL[NBK] - 07.10.2011
and no it didnt work i get errors
PHP код:
if(gTeam[playerid] == TEAM_POLICE)
}
new Float:RandomSpawns[][] =
{
{1249.7258, -2047.9263, 59.9209, 90.2055}, // Randomspawn
{1241.2084, -2057.6521, 60.0190, 94.9352}, // Randomspawn
{1241.0105, -2052.6873, 59.9975, 2.8144}, // Randomspawn
{718.4906, -1477.3024, 5.4688, 357.9947}, // Randomspawn
{722.3772, -1477.2856, 5.4688, 272.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.
Re: [HELP] Team Random Spawning -
CSSI - 07.10.2011
What Are the errors?
Re: [HELP] Team Random Spawning -
DaRkAnGeL[NBK] - 07.10.2011
010: invalid function or declaration
Re: [HELP] Team Random Spawning -
CSSI - 07.10.2011
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;
}
Re: [HELP] Team Random Spawning -
DaRkAnGeL[NBK] - 07.10.2011
Код:
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.