spawn conflict -
asri - 20.08.2017
i have bug in my gm.i take some code from grand larceny to make class selection.then i have deathmatch room,i enter the room but the is blank, is supposed to be a shamal interior.
Re: spawn conflict -
Kane - 20.08.2017
Find
SetPlayerInterior and check what interior you're being set to.
Re: spawn conflict -
asri - 26.08.2017
yes.i set the interior but same
Re: spawn conflict -
thegamer355 - 26.08.2017
Show us some code, no code, no help
Re: spawn conflict -
Bingo - 26.08.2017
Check if it's the same world and same interior.
Re: spawn conflict -
asri - 26.08.2017
PHP код:
public OnPlayerSpawn(PID)
{
if(IsPlayerNPC(PID)) return 1;
PlayerTextDrawHide(PID,Textdraw0);
PlayerTextDrawHide(PID,Textdraw1);
PlayerTextDrawHide(PID,Textdraw2);
PlayerTextDrawHide(PID,Textdraw3);
new randSpawn = 0;
SetPlayerInterior(PID,0);
TogglePlayerClock(PID,0);
GivePlayerMoney(PID, 350);
power(PID);
rBit2_Set(UnderWater, PID, false);
if(god_mode[PID] == 1)
{
SetPlayerHealth(PID, Float:0x7F800000);
}
if(InDM[playerid] == true)
{
switch (DM[playerid])
{
case 0: shamal
{
GivePlayerWeapon(playerid, 24, 1000);
SetPlayerHealth(playerid, 99);
SetPlayerArmour(playerid, 99);
new spawn = random(sizeof(DMZeroSpawns));
SetPlayerPos(playerid, DMZeroSpawns[spawn][0], DMZeroSpawns[spawn][1], DMZeroSpawns[spawn][2]);
SetPlayerFacingAngle(playerid, DMZeroSpawns[spawn][3]);
SetPlayerInterior(playerid, 1); //>> SetPlayerInterior
SetPlayerVirtualWorld(playerid, 1);
SetPlayerHealth(playerid, 99);
}
}
}
else
{
SetPlayerHealth(playerid, 99);
SetPlayerArmour(playerid, 99);
}
if(CITY_LOS_SANTOS == gPlayerCitySelection[playerid]) {
randSpawn = random(sizeof(gRandomSpawns_LosSantos));
SetPlayerPos(playerid,
gRandomSpawns_LosSantos[randSpawn][0],
gRandomSpawns_LosSantos[randSpawn][1],
gRandomSpawns_LosSantos[randSpawn][2]);
SetPlayerFacingAngle(playerid,gRandomSpawns_LosSantos[randSpawn][3]);
}
else if(CITY_SAN_FIERRO == gPlayerCitySelection[playerid]) {
randSpawn = random(sizeof(gRandomSpawns_SanFierro));
SetPlayerPos(playerid,
gRandomSpawns_SanFierro[randSpawn][0],
gRandomSpawns_SanFierro[randSpawn][1],
gRandomSpawns_SanFierro[randSpawn][2]);
SetPlayerFacingAngle(playerid,gRandomSpawns_SanFierro[randSpawn][3]);
}
else if(CITY_LAS_VENTURAS == gPlayerCitySelection[playerid]) {
randSpawn = random(sizeof(gRandomSpawns_LasVenturas));
SetPlayerPos(playerid,
gRandomSpawns_LasVenturas[randSpawn][0],
gRandomSpawns_LasVenturas[randSpawn][1],
gRandomSpawns_LasVenturas[randSpawn][2]);
SetPlayerFacingAngle(playerid,gRandomSpawns_LasVenturas[randSpawn][3]);
}
return 1;
}
Re: spawn conflict -
asri - 26.08.2017
help
Re: spawn conflict -
thegamer355 - 26.08.2017
Don't bumb your topic after an hour, wait 24 hours before bumping.
I see you're using SetPlayerVirtualWorld, but as Bingo said, check for the interior, use SetPlayerInterior
Re: spawn conflict -
asri - 26.08.2017
PHP код:
public OnPlayerSpawn(PID)
{
if(IsPlayerNPC(PID)) return 1;
PlayerTextDrawHide(PID,Textdraw0);
PlayerTextDrawHide(PID,Textdraw1);
PlayerTextDrawHide(PID,Textdraw2);
PlayerTextDrawHide(PID,Textdraw3);
new randSpawn = 0;
SetPlayerInterior(PID,0);
TogglePlayerClock(PID,0);
GivePlayerMoney(PID, 350);
power(PID);
rBit2_Set(UnderWater, PID, false);
if(god_mode[PID] == 1)
{
SetPlayerHealth(PID, Float:0x7F800000);
}
if(InDM[playerid] == true)
{
switch (DM[playerid])
{
case 0: shamal
{
GivePlayerWeapon(playerid, 24, 1000);
SetPlayerHealth(playerid, 99);
SetPlayerArmour(playerid, 99);
new spawn = random(sizeof(DMZeroSpawns));
SetPlayerPos(playerid, DMZeroSpawns[spawn][0], DMZeroSpawns[spawn][1], DMZeroSpawns[spawn][2]);
SetPlayerFacingAngle(playerid, DMZeroSpawns[spawn][3]);
SetPlayerInterior(playerid, 1); //>>i add but same
SetPlayerVirtualWorld(playerid, 1);
SetPlayerHealth(playerid, 99);
}
}
}
else
{
SetPlayerHealth(playerid, 99);
SetPlayerArmour(playerid, 99);
}
if(CITY_LOS_SANTOS == gPlayerCitySelection[playerid]) {
randSpawn = random(sizeof(gRandomSpawns_LosSantos));
SetPlayerPos(playerid,
gRandomSpawns_LosSantos[randSpawn][0],
gRandomSpawns_LosSantos[randSpawn][1],
gRandomSpawns_LosSantos[randSpawn][2]);
SetPlayerFacingAngle(playerid,gRandomSpawns_LosSantos[randSpawn][3]);
}
else if(CITY_SAN_FIERRO == gPlayerCitySelection[playerid]) {
randSpawn = random(sizeof(gRandomSpawns_SanFierro));
SetPlayerPos(playerid,
gRandomSpawns_SanFierro[randSpawn][0],
gRandomSpawns_SanFierro[randSpawn][1],
gRandomSpawns_SanFierro[randSpawn][2]);
SetPlayerFacingAngle(playerid,gRandomSpawns_SanFierro[randSpawn][3]);
}
else if(CITY_LAS_VENTURAS == gPlayerCitySelection[playerid]) {
randSpawn = random(sizeof(gRandomSpawns_LasVenturas));
SetPlayerPos(playerid,
gRandomSpawns_LasVenturas[randSpawn][0],
gRandomSpawns_LasVenturas[randSpawn][1],
gRandomSpawns_LasVenturas[randSpawn][2]);
SetPlayerFacingAngle(playerid,gRandomSpawns_LasVenturas[randSpawn][3]);
}
return 1;
}
Re: spawn conflict -
Nakul - 28.08.2017
Try this
PHP код:
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);