22.03.2014, 19:40
Hey guys,
I've a taxi NPC system and I'm scripting two cmds. I mapped interiors for the taxis et I want to the players they can look out with the command /dehors.
It works indeed, here is the cmd:
And this one is to go back to the view inside the taxi but it doesn't works.
Can anyone help me ? Thanks a lot
I've a taxi NPC system and I'm scripting two cmds. I mapped interiors for the taxis et I want to the players they can look out with the command /dehors.
It works indeed, here is the cmd:
pawn Код:
if(strcmp("/dehors", cmdtext, true) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid, 10, 2021.9390,2241.9487,2103.9536))
{
SendClientMessage(playerid, COLOR_RED, "Tu n'es pas dans un taxi.");
return 1;
}
GetPlayerPos(playerid, Playerx[playerid], Playery[playerid], Playerz[playerid]);
GetPlayerFacingAngle(playerid, Playera[playerid]);
PlayerSkin[playerid] = GetPlayerSkin(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerSpectating(playerid, 1);
if(TaxiID[playerid] == 1)
{
PlayerSpectateVehicle(playerid, Taxi2);
}
else
{
PlayerSpectateVehicle(playerid, Taxi);
}
SetTimerEx("ResetView", 2000, 0, "d", playerid);
return 1;
}
And this one is to go back to the view inside the taxi but it doesn't works.
pawn Код:
if(strcmp("/dedans", cmdtext, true) == 0)
{
GetPlayerPos(playerid, Playerx[playerid], Playery[playerid], Playerz[playerid]);
GetPlayerFacingAngle(playerid, Playera[playerid]);
PlayerSkin[playerid] = GetPlayerSkin(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerSpectating(playerid, 0);
SetTimerEx("ResetView", 2000, 0, "d", playerid);
return 1;
}