Need help with /enter and /exit - 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: Need help with /enter and /exit (
/showthread.php?tid=417087)
Need help with /enter and /exit -
lramos15 - 19.02.2013
I have a /enter and /exit command I get the /enter to work but the /exit wont I also want it to display text when on or near the pickup how?
Код HTML:
if(!strcmp(cmdtext, "/enter", true))
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1929.3467,-1776.0195,13.5469))
{
SetPlayerPos(playerid,-30.946699,-89.609596,1003.549988);//Idlegas entrance
SetPlayerInterior(playerid, 18);
}
}
if(!strcmp(cmdtext, "/exit", true))
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, -30.9595,-91.7379,1003.5469))
{
SetPlayerPos(playerid,1929.3467,-1776.0195,13.5469);//Idlegas Exit
}
}
return 0;
}
Re: Need help with /enter and /exit -
Jstylezzz - 19.02.2013
I think the reason the /exit command doesn't work is because you're not in range of the coordinates in the IsPlayerInRangeOfPoint function..
Try to resave the coords, adding them into the command again and increasing the range a little.
For text above the pickup, use
Create3DTextLabel, or
CreateDynamic3DTextLabel if you use a streamer.
And next time, you can put pawn code between pawn tags > [pawn]
Re: Need help with /enter and /exit -
lramos15 - 19.02.2013
That doesn't make sense because my IsPlayerInRangeOfPoint is set to the exact cord of the pickup
Код:
AddStaticPickup(1239, 1,1929.3467,-1776.0195,13.5469,-1);//Idlegas entrance
AddStaticPickup(1239,1,-30.9595,-91.7379,1003.5469);//Idlegas Exit
Re: Need help with /enter and /exit -
lramos15 - 22.02.2013
Bump