SetSpawnInfo problem? - 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: SetSpawnInfo problem? (
/showthread.php?tid=453900)
SetSpawnInfo problem? -
Hargrave - 26.07.2013
Hello everyone!
Once again I have started on a new script. Basically I will make a gamemode from scratch and try to learn scripting from that, so well I am now coming with a dumb question (I guess).
SetSpawnInfo(playerid, 0, 1686.1014, -2332.1179, -2.6797, 355.4632, 0, 0, 0, 0, 0, 0); doesn't work. I have tried everything, by the way I got the coordinates from AddPlayerClass as I did /save where I wanted the spawn, but it seems like it doesn't want to work. So actually I just wondering why it doesn't work and what I can do to fix it, because that is exactly where I want all members to spawn and they shall always spawn there anyways if they have an account or they need to register one, that's the spawn!
This is the warning I am getting (I don't want any warnings):
Quote:
(292) : warning 213: tag mismatch
(292) : warning 202: number of arguments does not match definition
Line 292: SetSpawnInfo(playerid, 0, 1686.1014, -2332.1179, -2.6797, 355.4632, 0, 0, 0, 0, 0, 0);
Line 293: SpawnPlayer(playerid);
|
Re: SetSpawnInfo problem? -
MP2 - 26.07.2013
Do you set their position (SetPlayerPos) when they spawn (OnPlayerSpawn)?
As for the warning, look up the parameters of SetSpawnInfo. The first three values are integers - playerid, team and skin - but your third parameter is a float (x coordinate). You're missing the team. Use NO_TEAM if you don't want to set teams.
Re: SetSpawnInfo problem? -
Hargrave - 26.07.2013
Why does this:
Quote:
0,1686.1014,-2332.1179,-2.6797,355.4632,0,0,0,0,0,0
|
Work and not mine? And anyways I am new in scripting so it would be a lot easier for me if you could explain where and why I should use NO_TEAM. No clue what you are talking about mate
Re: SetSpawnInfo problem? -
Hargrave - 26.07.2013
The website is lagging so bad, so I didn't notice I wrote the same thing twice, sorry for that. Please delete this comment, thanks.
SOLVED anyways.