Posts: 158
Threads: 54
Joined: Aug 2010
Reputation:
0
I have made the Area51 dm so it tp's you there on random spawn and gives you weapons.
Now.
i have the /teles which brings a teleport menu up.
When they select to play on a Deathmatch on the /teles menu i want it so when they try and type /teles in the DM it pops up saying you cannot do this in a Deathmatch! type /kill to leave
is there a way? if so how i do it?
If so it would be a big help
Thanks
Posts: 6,129
Threads: 36
Joined: Jan 2009
Have you created any variables which store information about whether the player is attending a DM match? If not, that's what you should do - create a PVar or normal array boolean to store whether it's true or false if the player is attending a DM match, you set it to true when they begin to attend the event and you set it to false when they die in OnPlayerDeath.
Posts: 193
Threads: 27
Joined: May 2011
Reputation:
0
recently i solved this.
do you using, dcmd ?
Posts: 158
Threads: 54
Joined: Aug 2010
Reputation:
0
Any Help on how to create PVars?
Posts: 158
Threads: 54
Joined: Aug 2010
Reputation:
0
Nope i dont use dcmd.. Do i need it?
Posts: 193
Threads: 27
Joined: May 2011
Reputation:
0
HideMenuForPlayer(menuid, playerid);
do you think this one ?
Posts: 3,004
Threads: 12
Joined: May 2011
lol...all here gave you an option..
so i give my own suggest/option ::
here:
pawn Код:
new bool:pInDM[MAX_PLAYERS]; // = PlayerInDM -- you can rename it to whatever you want... [MAX_PLAYERS] define the - playerid
// ok now you can make : pInDM[playerid] == 1 or pInDM[playerid] == 0 --- 1 = true 0 = false
public OnPlayerCommandText(playerid, cmdtext[])
{ // command line....
if (strcmp("/dm", cmdtext, true, 10) == 0)
{
{
pInDM[playerid] = 1 // you can make " pInDM[playerid] == 0 " if you want... but remember the 0 mean thet the player in DM ,, well i decided then "1" mean then player in DM
// ok i put player in DM
SetPlayerPos(playerid, 0, 0, 10); // under thet(pInDM) you can put whatever you want...
return 1;
}
if (strcmp("/healme", cmdtext, true, 10) == 0)
{
{ // checks if player in DM
if(pInDM[playerid] == 1) //
{
SendClientMessage(playerid, 0x667788, "Exit DM please(/exitdm)");
}else{ // if player is not in DM
SetPlayerHealth(playerid, 100.0);
}
return 1;
}
if (strcmp("/exitdm", cmdtext, true, 10) == 0)
{ // checks if player is not in DM
if(pInDM[playerid] == 0)
{ // if player is not in DM
SendClientMessage(playerid, 0x667788, "You are not in DM place");
}else{ // if player in DM
// i put player out of DM
pInDM[playerid] == 0
// you can put here whatever you want :)
SetPlayerPos(playerid, 0, 0, 10.0);
}
return 1;
}
return 0;
}
i hope you understanded me and i helped you