TP Command Problem - 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: TP Command Problem (
/showthread.php?tid=508423)
TP Command Problem -
ChuckyBabe - 22.04.2014
Hello, i have a command /loungeenter but everytime i type it, it tp'ing me to the default not in the position i want here's my current code hope you can fix this..
pawn Код:
CMD:loungeenter(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 13.0, -4398.9072, 870.9648, 986.3803))
{
if(PlayerInfo[playerid][pDonator] >= 0)
{
SetPlayerPos(playerid, -2636.7969,1403.7454,907.6803);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have entered the the VIP Lounge!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
}
}
return 1;
}
I mean if i type /loungeenter it doesn't tp'ing me to the position i want
Re: TP Command Problem -
Stinged - 22.04.2014
You set the interior and virtual work before setting the position.
Re: TP Command Problem -
ChuckyBabe - 22.04.2014
Nevermind it i already solve it because -2636.7969,1403.7454,907.6803 this is not a interior 0 that is interior 3 that's why
Re: TP Command Problem -
Flake. - 22.04.2014
Also your code
pawn Код:
if(PlayerInfo[playerid][pDonator] >= 0)
You do realise that'll let anyone inside the VIP lounge right?
Re: TP Command Problem -
ChuckyBabe - 22.04.2014
Quote:
Originally Posted by (*|Flake|*)
Also your code
pawn Код:
if(PlayerInfo[playerid][pDonator] >= 0)
You do realise that'll let anyone inside the VIP lounge right?
|
Yes don't mind it.. I have a dynamic door that don't allow not donator to enter.
Re: TP Command Problem -
Flake. - 22.04.2014
Quote:
Originally Posted by ChuckyBabe
Yes don't mind it.. I have a dynamic door that don't allow not donator to enter.
|
Then why even run the check?
Re: TP Command Problem -
ChuckyBabe - 22.04.2014
Quote:
Originally Posted by (*|Flake|*)
Then why even run the check?
|
Nothing just want to have a long code
P.S = How to make it for vips 1 up only ?
Re: TP Command Problem -
itsCody - 22.04.2014
you could try if(PlayerInfo[playerid][pDonator] < 1) if it don't work just use if(PlayerInfo[playerid][pDonator] >= 1)