dm zone help +rep
#1

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 <>
Reply
#2

Do you mean how to stop the player from using /exitdm command?
and u need to make teleport command to the dm zone?
Reply
#3

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 . .
Reply
#4

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
Reply
#5

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;
}
Reply
#6

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
Reply
#7

-,- use my cords , its works , u cant use any cmd when u in dm zone
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)