/enter, /exit, system/commands. - 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: /enter, /exit, system/commands. (
/showthread.php?tid=468440)
/enter, /exit, system/commands. -
Heisenbergx2 - 08.10.2013
I've been trying to make some kind of a enter/exit system but it seems to be pretty confusing.
This is the code I've been using so far (Only the /enter cmd) but I'd like to know if there is a more simple way to do this:
pawn Код:
if(strcmp(cmdtext, "/enter", true) ==0)
{
if(IsPlayerInRangeOfPoint(playerid , 1.3 , -217.6554, 979.0903, 19.5029))
{
SetPlayerInterior(playerid , 6);
SetPlayerVirtualWorld(playerid, 2);
SetPlayerPos(playerid , 246.783996 , 63.900199 , 1003.640625);
return 1;
}
}
if(strcmp(cmdtext, "/enter", true) ==0)
{
if(IsPlayerInRangeOfPoint(playerid , 1.3 , -207.2017,1119.1793,20.4297))
{
SetPlayerInterior(playerid , 4);
SetPlayerVirtualWorld(playerid, 3);
SetPlayerPos(playerid , -27.312299,-29.277599,1003.557250);
return 1;
}
}
And I can't get the /exit command working the same way..
I tried this include: [FS] • [eSystem]: Entrances and Exits builder v0.1 • (
http://forum.sa-mp.com/showthread.ph...983&highlight=[eSystem]), but I was just wondering how to make the /enter and /exit cmds since I assume there are no premade ones in that script and I couldn't really get a hold of it when I read the topic.
So could someone tell me a simple way to do this or hook me up with some include or something? Cheers!
Re: /enter, /exit, system/commands. -
MAFIAWARS - 08.10.2013
Quote:
Originally Posted by Heisenbergx2
I've been trying to make some kind of a enter/exit system but it seems to be pretty confusing.
This is the code I've been using so far (Only the /enter cmd) but I'd like to know if there is a more simple way to do this:
pawn Код:
if(strcmp(cmdtext, "/enter", true) ==0) { if(IsPlayerInRangeOfPoint(playerid , 1.3 , -217.6554, 979.0903, 19.5029)) { SetPlayerInterior(playerid , 6); SetPlayerVirtualWorld(playerid, 2); SetPlayerPos(playerid , 246.783996 , 63.900199 , 1003.640625); return 1; } }
if(strcmp(cmdtext, "/enter", true) ==0) { if(IsPlayerInRangeOfPoint(playerid , 1.3 , -207.2017,1119.1793,20.4297)) { SetPlayerInterior(playerid , 4); SetPlayerVirtualWorld(playerid, 3); SetPlayerPos(playerid , -27.312299,-29.277599,1003.557250); return 1; } }
And I can't get the /exit command working the same way..
I tried this include: [FS] • [eSystem]: Entrances and Exits builder v0.1 • ( http://forum.sa-mp.com/showthread.ph...983&highlight=[eSystem]), but I was just wondering how to make the /enter and /exit cmds since I assume there are no premade ones in that script and I couldn't really get a hold of it when I read the topic.
So could someone tell me a simple way to do this or hook me up with some include or something? Cheers!
|
You made /enter Commands two Times. You didn't make /exit Command lol.