SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Thread Tools Display Modes
Old 31/08/2010, 10:09 AM   #1
Little Clucker
Join Date: May 2010
Posts: 10
Reputation: 0
Question Team Death Match

I need to find out how to make Teams spawn at different place's and random spawn....
(-1385.2020,507.8355,18.2294,81.0479,0,0,0,0,0,0); // Red Team Spawn
(147.8706,2501.1167,16.4844,287.1192,0,0,0,0,0,0); // Blue Team Spawn
pryor94 is offline   Reply With Quote
Old 31/08/2010, 10:17 AM   #2
LarzI's Avatar
Join Date: Apr 2007
Location: Norway
Posts: 3,504
Reputation: 132
Default Re: Team Death Match

    Float:gRandomSpawn[maxspawnsinhere][3] =
         {0.0, 0.0, 0.0},
         {0.0, 0.0, 0.0}

new iRandom = random( sizeof( gRandomSpawn ));
SetPlayerPos( playerid, gRandomSpawn[iRandom][0], gRandomSpawn[iRandom][1], gRandomSpawn[iRandom][2] );

That is an easy code which will spawn player at one of the coords you added in the variable (randomly chosen).

Onplayerspawn, to make teams spawn at different places, just do a check if he's a blue or red player, then spawn him on the correct location.
LarzI is offline   Reply With Quote
Old 31/08/2010, 10:24 AM   #3
Little Clucker
Nekrus2's Avatar
Join Date: Aug 2010
Posts: 43
Reputation: 0
Default Re: Team Death Match

if (gTeam[playerid] == TEAM_RED);
if (gTeam[playerid]) == TEAM_BLUE); 

ok try this
put this in OnPlayerSpawn
its untested done from my head (as i have not got pawn on this computer and i will put correction to this as i get back to my computer if i done something wrong )
EDIT: someone was faster ... xD
[PL].::Ultimate DeathMatch::.[PL]
Beta Tests
Nekrus2 is offline   Reply With Quote
Old 29/05/2012, 11:40 AM   #4
Big Clucker
Join Date: Feb 2012
Location: Mars
Posts: 115
Reputation: 13
Default Re: Team Death Match
Gangs_Rocks is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Team Death Match Patrikas Scripting Help 4 29/05/2012 11:50 AM
Server Restart on all players on team death lSCARl Help Archive 1 11/08/2010 02:09 PM
-| [Off Topic] |- [Adelanto] The Unforgiven Team Death Match Sandman-x Español/Spanish 11 11/07/2010 06:37 AM
SFTDM - San Fierro Team Death Match Final Version By Wilton Borim. wilton Filterscripts 38 01/03/2010 09:35 PM

All times are GMT. The time now is 09:13 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.