class select
#1

how can i make it
that whenn they choose one sort of class
they spawn at diffrent places
i mean one in that corner and one in that corner
not all at the same place?
Reply
#2

Do you want to let a team spawn in an other area than the other, or do you want to modify "AddPlayerClass" ? Do you want those places to be randomly set?
Reply
#3

ye randomly spawning
Reply
#4

Right so you want them to spawn randomly in a custom position e.g interior or?? like SF, LV & LS?
Reply
#5

pawn Код:
public OnPlayerSpawn(playerid)
{
new randomspawn=random(5);

if(GetPlayerTeam(playerid)==BALLAS)
{
switch(randomspawn)
{
case 0: SetPlayerPos(playerid, X, Y, Z);
case 1: SetPlayerPos(playerid, X, Y, Z);
case 2: SetPlayerPos(playerid, X, Y, Z);
case 3: SetPlayerPos(playerid, X, Y, Z);
case 4: SetPlayerPos(playerid, X, Y, Z);
case 5: SetPlayerPos(playerid, X, Y, Z);
}
}

else if(GetPlayerTeam(playerid)==GROVE)
{
switch(randomspawn)
{
case 0: SetPlayerPos(playerid, X, Y, Z);
case 1: SetPlayerPos(playerid, X, Y, Z);
case 2: SetPlayerPos(playerid, X, Y, Z);
case 3: SetPlayerPos(playerid, X, Y, Z);
case 4: SetPlayerPos(playerid, X, Y, Z);
case 5: SetPlayerPos(playerid, X, Y, Z);
}
}

return 1;
}
Like this?

Reply
#6

Quote:
Originally Posted by ♣ ©ⓤⓝⓔⓞ ♣
Right so you want them to spawn randomly in a custom position e.g interior or?? like SF, LV & LS?
yes i want for example this

Spawn1
x=-1637.3399
y=674.1799
z=7.1875
angle=260.0000
Location Name: Interior-0

Spawn2
x=-1600.3358
y=650.8590
z=7.1875
angle=356.8209
Location Name: Interior-0

Spawn3
x=-1579.5858
y=673.4845
z=7.1901
angle=142.5223
Location Name: Interior-0

with 3 skins
and if they choose one of the skins
they will be placed randomly on one of the 3 spawnplaces
Reply
#7

pawn Код:
public OnPlayerSpawn(playerid)
{
if(GetPlayerSkin(playerid)==1 || GetPlayerSkin(playerid)==2 || GetPlayerSkin(playerid)==3)
{
new randspwn(2);

switch(randspwn)
{
case 0: SetPlayerPos(playerid, -1637.3399, 674.1799 , 7.1875);
case 1: SetPlayerPos(playerid, -1600.3358, 650.8590, 7.1875);
case 2: SetPlayerPos(playerid, -1579.5858, 673.4845, 7.1901);
}
}
return 1;
}
That should fit.
Reply
#8

ok i will try it thanks
Reply
#9

Nice code, and now if You're switching between classes (in class selection screen) then
how to do that You see the class is currently showing (i mean whit textdraw)
Reply
#10

Quote:
Originally Posted by Kuba_PL
Nice code, and now if You're switching between classes (in class selection screen) then
how to do that You see the class is currently showing (i mean whit textdraw)
That should be under OnPlayerRequestSpawn. You can switch threw the skins or the teams then.
Reply


Forum Jump:


Users browsing this thread: 7 Guest(s)