Spawn Change - 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: Spawn Change (
/showthread.php?tid=660530)
Spawn Change -
Dainteresebuli - 05.11.2018
Hello Guys, i have Gamemode wich is not an England mode, so when i am at faction after death i am spawning at hospital , how to disable this Function Please? i think that posible, i will +re you if you help me some .
Re: Spawn Change -
StRaphael - 05.11.2018
Try adding at the end on OnPlayerSpawn(playerid) public function this code:
Code:
if(PlayerInfo[playerid][pMember] == f/*(f is the id of the player's faction)*/)
{
SetPlayerPosition(playerid, x, y, z);
}
// Where first variable( PlayerInfo[playerid][pMember] ) is the faction variable for player(you need to replace this with your gamemode variables) and SetPlayerPosition(playerid, x, y, z) is the new spawn position(also you need to replace them by your coordinates).
Hope this helps
Re: Spawn Change -
Dainteresebuli - 05.11.2018
Quote:
Originally Posted by StRaphael
Try adding at the end on OnPlayerSpawn(playerid) public function this code:
Code:
if(PlayerInfo[playerid][pMember] == f/*(f is the id of the player's faction)*/)
{
SetPlayerPosition(playerid, x, y, z);
}
// Where first variable( PlayerInfo[playerid][pMember] ) is the faction variable for player(you need to replace this with your gamemode variables) and SetPlayerPosition(playerid, x, y, z) is the new spawn position(also you need to replace them by your coordinates).
Hope this helps
|
Not Works
Re: Spawn Change -
StRaphael - 05.11.2018
Quote:
Originally Posted by Dainteresebuli
Not Works
|
Have you adapted the variables to your gamemode? Does it returns any errors/warnings when you compile?
Re: Spawn Change -
Dainteresebuli - 05.11.2018
Quote:
Originally Posted by StRaphael
Have you adapted the variables to your gamemode? Does it returns any errors/warnings when you compile?
|
Can you hel me via team viewer? i am just starter and need to remove spawning after death at hospital , i ned to spawn if you are grove spawn at base and not a hospital
Re: Spawn Change -
v1k1nG - 05.11.2018
Use SetSpawnInfo,
PHP Code:
if(P[playerid][Member] != 0){
SetSpawnInfo(...); // Spawn him elsewhere
}
else SetSpawnInfo(...); // Spawn him at hospitals
Maybe under OnPlayerDeath
Re: Spawn Change -
TheToretto - 05.11.2018
Use debugs after deaths, if you really don't find the line spawning you at the hospital. Or, die and /save, you shouldn't move. Then copy the coords and CTRL + F in your gamemode.