Player spawn at wrong place
#1

Hello ,

In my gamemode I have 2 classes , 1 class spawn somewhere , the second I added it's looked similar to that one :
AddPlayerClass( 0, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );, and when I respawn a new class it's repsawn me in the same place as the first class and yes I have different co-ordination I'm now any help ?
Reply
#2

Add me in skype and i will help you with teamviewer
Sorry my english bad
Reply
#3

Anyone have resolution ??
Reply
#4

Bump

Any help ?
Reply
#5

Can you give the whole code of where you add classes and where/how you spawn them?
Reply
#6

OK

This is my first class :

Quote:

AddPlayerClass(280, 1310.1509, -1367.6149 ,13.5383 ,179.3588, 0, 0, 0, 0, 0, 0);

And the second one which I want to spawn in different location :

Quote:

AddPlayerClass(0, 2530.2471, -1698.7323 ,13.4976 ,240.3018, 16, 5, 28, 140, 23, 30);

And on spawn code I have that :

Quote:

public OnPlayerSpawn(playerid)
{
SetPlayerPos (playerid, 1310.1509,-1367.6149,13.5383);
SetPlayerHealth (playerid, 100);
SetPlayerArmour (playerid, 100);
new PlayerName[MAX_PLAYER_NAME],
string[128];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "%s has spawned.", PlayerName);
SendClientMessageToAll(0xFFFFFFFF, string);
return 1;
}

On spawn code I notice there is same location as the first class so maybe that cause the problem with location
Reply
#7

Yeah, that's the problem. Because you specifically MENTIONED to spawn in the co-ordinates. You could get the classid, like if(classid = 0), SetPlayerPos(playerid, Spawn here.), else .... The other co-ordinates.
Reply
#8

I don't understand a litter bit about classid and when I SetPlayerPos to different location It will still respawn me in same place but I want to respawn different character at different place :/

Put :

if(classid = 0), SetPlayerPos(playerid, 2530.2471, -1698.7323 ,13.4976.);
Instead of SetPlayerPos and get errors
Reply
#9

Any Idea ?
Reply
#10

Are you using RandomSpawn ? i mean one team spawn at different positions ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)