Spawn Change
#1

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 .
Reply
#2

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
Reply
#3

Quote:
Originally Posted by StRaphael
View Post
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
Reply
#4

Quote:
Originally Posted by Dainteresebuli
View Post
Not Works
Have you adapted the variables to your gamemode? Does it returns any errors/warnings when you compile?
Reply
#5

Quote:
Originally Posted by StRaphael
View Post
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
Reply
#6

Use SetSpawnInfo,

PHP Code:
if(P[playerid][Member] != 0){
    
SetSpawnInfo(...); // Spawn him elsewhere 
}
else 
SetSpawnInfo(...); // Spawn him at hospitals 
Maybe under OnPlayerDeath
Reply
#7

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)