dm zone help +rep - 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: dm zone help +rep (
/showthread.php?tid=364493)
dm zone help +rep -
NuLIO - 30.07.2012
hi guys i have maps for derby and deathmatch (dm) and minigun i want how can i made it the player cant tp to anyplace and dont use any cmd only /exitdm
plz help guys i am not good at script but i am learning <>
Re: dm zone help +rep -
CoDeZ - 30.07.2012
Do you mean how to stop the player from using /exitdm command?
and u need to make teleport command to the dm zone?
Re: dm zone help +rep -
Devilxz97 - 30.07.2012
pawn Code:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
//>> Top of your Script;
new Deathmatch[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
Deathmatch[playerid] = 0; //>> Remove player from the DM Minigames when Reconnect
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
Deathmatch[playerid] = 0; //>> Remove player from the DM Minigames after Disconnect
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
Deathmatch[playerid] = 0; //>> when you death u will be automatically remove from the Match!
return 1;
}
//how to disable cmd ? example here;
CMD:hahaha(playerid, params[])
{
if(Deathmatch[playerid]) return SendClientMessage(playerid, -1, "You cant use this cmd while u in DM"); //put this to all cmd u want to disable
//Your other code
return 1;
}
try . .
Re: dm zone help +rep -
NuLIO - 31.07.2012
i dont mean that, i dont want to stop player from /exitdm,
i have add tele cmd only and they can go anywhere they want i want how to add zone they cant go out until they type /exitdm and i dont want the players use cmds in the zone
Re: dm zone help +rep -
[MM]RoXoR[FS] - 31.07.2012
pawn Code:
new bool:IsPlayerInDM[MAX_PLAYERS] = false;
//When player enters a DM
IsPlayerInDM[playerid] = true;
public OnPlayerCommandText(playerid,cmdtext[])
{
if(strcmp(cmdtext,"/exitdm",true) == 0) {
IsPlayerInDM[playerid] = false;
return 1; }
//Now to stop him from entering any other command.
if(IsPlayerInDM[playerid] == true) return SendClientMessage(playerid,-1,"You must leave DM to use this command.Use /exitdm");
//Your other commands
return 0;
}
Re: dm zone help +rep -
NuLIO - 31.07.2012
i add this but didnot work i want how to make dm zone and player cant do cmds in it ,
and plz explain it all because i am not good at scripting
Re: dm zone help +rep -
Devilxz97 - 31.07.2012
-,- use my cords , its works , u cant use any cmd when u in dm zone