HELP disableing teleports when in DM zones - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: HELP disableing teleports when in DM zones (
/showthread.php?tid=89995)
HELP disableing teleports when in DM zones -
wilcock33 - 05.08.2009
as the title suggests i need help
ok i have made 5 DM zones, each with its own virtual world
i tried using AllowPlayerTeleport(playerid, 0)
but then he/she won be able to exit the dm!
please help!
Re: HELP disableing teleports when in DM zones -
dice7 - 05.08.2009
pawn Код:
new IsPlayerInDM[MAX_PLAYERS];
/*when player goes to dm*/
IsPlayerInDM[playerid] = 1;
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/exitdm"))
{
IsPlayerInDM[playerid] = 0;
SetPlayerPos(playerid, outside of dm);
}
if(IsPlayerInDM[playerid] != 0) return SendClientMessage(playerid, COLOR_RED, "Sorry, you can't use commands while in a dm zone. Type /exitdm to leave it");
/*your other commands*/
}
Re: HELP disableing teleports when in DM zones -
wilcock33 - 05.08.2009
Quote:
Originally Posted by dice7
pawn Код:
new IsPlayerInDM[MAX_PLAYERS];
/*when player goes to dm*/ IsPlayerInDM[playerid] = 1;
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/exitdm")) { IsPlayerInDM[playerid] = 0; SetPlayerPos(playerid, outside of dm); } if(IsPlayerInDM[playerid] != 0) return SendClientMessage(playerid, COLOR_RED, "Sorry, you can't use commands while in a dm zone. Type /exitdm to leave it");
/*your other commands*/ }
|
lol thanks for the reply, but it didnt work
any other suggestions?