[BUG] From stadium to an other place ! -
Yaszine - 20.08.2011
Hello everybody
I had a bug while changing places exactly from interior x (stadiums...) to 0 (normal) WITH VEHICLE
When I am in 'Kickstart' stadium or other interior != 0, every things went good (cars appears, interior works very well...) but when I try to leave that stadium to change place like go to '/lv1' within the stadium car, that bug because it send
Code:
SERVER: Unknown Command.
And in LV1 position nothing shown because it still the same interior of KickStart Stadium, cars are hidden, buildings too...
This is the /lv1 command:
pawn Code:
if (strcmp("/lv1", cmdtext, true, 10) == 0)
{
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(InStadium[playerid] == 1)
{
RemovePlayerFromVehicle(playerid);
return InStadium[playerid] = 0;
}
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
SetPlayerInterior(GetPlayerVehicleID(playerid), 0);
SetVehicleZAngle(GetPlayerVehicleID(playerid),269.1614);
return SetVehiclePos(GetPlayerVehicleID(playerid),1991.2103,1093.3450,10.6719);
}
else
{
InStadium[playerid] = 0;
SetPlayerPos(playerid,1986.5909,1083.7815,10.8203);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid, 234.0678);
}
If I am OnFoot in stadium that works very well but InCar !!!
I want if a player in stadium and he is in car and try to leave the stadium:
Remove him from his car.
Teleport him with no bugs.
Sorry for my bad English :$
Please I need your help :/
Re: [BUG] From stadium to an other place ! -
Davz*|*Criss - 20.08.2011
Try Zcmd its better than this.
Re : [BUG] From stadium to an other place ! -
Yaszine - 20.08.2011
But, That will fix the interior bug in you opinion ?? Thanks
Re: [BUG] From stadium to an other place ! -
Davz*|*Criss - 20.08.2011
Ofcourse just try switching to Zcmd and if you got any errors/warnings please re-post here and we'are here to help you.
Re : [BUG] From stadium to an other place ! -
Yaszine - 20.08.2011
Alright, Thanks a bunch man
Re: [BUG] From stadium to an other place ! -
Machida - 20.08.2011
You dont need to remove player from car ...Example...
if you do this, it will teleport the player even if he is in a car (Automatic removed from vehicle..):
SetPlayerPos(playerid,1986.5909,1083.7815,10.8203) ;
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid, 234.0678 );
I dont know if is that what you want, But i think it is..
Re : [BUG] From stadium to an other place ! -
Yaszine - 21.08.2011
Thanks for you reply
The problem:
When player in car and in stadium and type command to change his place like go to Las Venturas downtown with '/lv1' so the player get teleported to that place without car but there are no buildings and nothing shown (interior!!)
Re: [BUG] From stadium to an other place ! -
Machida - 21.08.2011
SetPlayerInterior(playerid, 0);
Interior IDs:
https://sampwiki.blast.hk/wiki/InteriorIDs
Re : [BUG] From stadium to an other place ! -
Yaszine - 21.08.2011
But, There is already in my script, it bugs or I don't know what happens :/
Re : [BUG] From stadium to an other place ! -
Yaszine - 21.08.2011
I made this:
pawn Code:
if (strcmp("/lv1", cmdtext, true, 10) == 0) /// modifier
{
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(InStadium[playerid] == 0)
{
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
SetPlayerInterior(GetPlayerVehicleID(playerid), 0);
SetVehicleZAngle(GetPlayerVehicleID(playerid),269.1614);
SetVehiclePos(GetPlayerVehicleID(playerid),1991.2103,1093.3450,10.6719);
}
else if(InStadium[playerid] == 1)
{
//RemovePlayerFromVehicle(playerid);
InStadium[playerid] = 0;
SetPlayerPos(playerid,1986.5909,1083.7815,10.8203);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid, 234.0678);
}
}
else
{
InStadium[playerid] = 0;
SetPlayerPos(playerid,1986.5909,1083.7815,10.8203);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid, 234.0678);
}
return 1;
}
I fix the interior problem but that works slowly when I want to move from vehicle in stadium to /lv1
It takes more than 3seconds to teleport me to /lv1 and the camera is too far, nearly 2sec to stay behind him
Re: [BUG] From stadium to an other place ! -
Davz*|*Criss - 21.08.2011
I tried In-game everything works fine, Interior loads in 1 sec, So what's the problm ?
pawn Код:
if (strcmp("/lv1", cmdtext, true, 10) == 0) /// modifier
{
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(InStadium[playerid] == 0)
{
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
SetPlayerInterior(GetPlayerVehicleID(playerid), 0);
SetVehicleZAngle(GetPlayerVehicleID(playerid),269.1614);
SetVehiclePos(GetPlayerVehicleID(playerid),1991.2103,1093.3450,10.6719);
}
if(InStadium[playerid] == 1)
{
//RemovePlayerFromVehicle(playerid);
InStadium[playerid] = 0;
SetPlayerPos(playerid,1986.5909,1083.7815,10.8203);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid, 234.0678);
}
}
else
{
InStadium[playerid] = 0;
SetPlayerPos(playerid,1986.5909,1083.7815,10.8203);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid, 234.0678);
}
return 1;
}
Thanks
Re : [BUG] From stadium to an other place ! -
Yaszine - 21.08.2011
Me I tried InGame too that function but it works slowly, and the others works fine !! I don't know why
Re: [BUG] From stadium to an other place ! -
pen_theGun - 21.08.2011
SetPlayerInterior(
GetPlayerVehicleID(playerid), 0);