06.03.2012, 09:32
Hello There SShady Here
i was Making a DM and a /leavedm command BUt its not Working Kinda
This is the Variable which will check that player is in DM or Not
And this is the going to DM Command aka /glassdm
And This is my /leavedm Command
And this Code is also added in The onplayerCOmmandteXt Callback
And the
It says welcome to DM etc etc
And when i type any Command it says YOu need to leave the DM
And when i type the leavedm command /leave it says
it again says
Command it says YOu need to leave the DM
it means its also disabling the /leave Command
Is there any way so i can Unblock this /leave COmmand in DM
Thnx
i was Making a DM and a /leavedm command BUt its not Working Kinda
This is the Variable which will check that player is in DM or Not
Код:
new busy[MAX_PLAYERS];
Код:
if(strcmp(cmdtext, "/glassdm", true) == 0) { ResetPlayerWeapons(playerid); new GlassMadness[128], playerName[MAX_PLAYER_NAME], RandomSpawn = random(8); GetPlayerName(playerid, playerName, MAX_PLAYER_NAME); busy[playerid] = 1; if (RandomSpawn == 0) { InCar[playerid] = false; SetPlayerPos(playerid, -33.6020,1507.4240,95.4173); SetPlayerFacingAngle(playerid, 325.6300); SetCameraBehindPlayer(playerid); } if (RandomSpawn == 1) { InCar[playerid] = false; SetPlayerPos(playerid, -12.6829,1507.4701,95.4341); SetPlayerFacingAngle(playerid, 40.2041); SetCameraBehindPlayer(playerid); } if (RandomSpawn == 2) { InCar[playerid] = false; SetPlayerPos(playerid, -12.6831,1544.3137,95.4309); SetPlayerFacingAngle(playerid, 146.1118); SetCameraBehindPlayer(playerid); } if (RandomSpawn == 3) { InCar[playerid] = false; SetPlayerPos(playerid, -32.7342,1543.9973,95.4126); SetPlayerFacingAngle(playerid, 220.0591); SetCameraBehindPlayer(playerid); } if (RandomSpawn == 4) { InCar[playerid] = false; SetPlayerPos(playerid, -23.6215,1545.4828,95.4222); SetPlayerFacingAngle(playerid, 181.8555); SetCameraBehindPlayer(playerid); } if (RandomSpawn == 5) { InCar[playerid] = false; SetPlayerPos(playerid, -11.9289,1525.8883,95.4330); SetPlayerFacingAngle(playerid, 89.4213); SetCameraBehindPlayer(playerid); } if (RandomSpawn == 6) { InCar[playerid] = false; SetPlayerPos(playerid, -23.4273,1505.9843,95.4257); SetPlayerFacingAngle(playerid, 359.8071); SetCameraBehindPlayer(playerid); } if (RandomSpawn == 7) { InCar[playerid] = false; SetPlayerPos(playerid, -34.1823,1525.6079,95.4088); SetPlayerFacingAngle(playerid, 270.5063); SetCameraBehindPlayer(playerid); } GivePlayerWeapon(playerid, 29, 130); SetPlayerInterior(playerid, 0); new name[MAX_PLAYER_NAME], string[256]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "{8B8F8F}(TELE):{00FFFB}%s {8B8F8F}Has Joined The GlassDM {00FFFB}/glassdm.", name); SendClientMessageToAll(0xC4C4C4FF, string); for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(ReceiveInfo[i] == true) { SendClientMessage(i, COLOR_WHITE, GlassMadness); } } } return 1; }
Код:
if(strcmp(cmdtext, "/leave", true) == 0) { busy[playerid] == 0; SpawnPlayer(playerid); SetCameraBehindPlayer(playerid); SendClientMessage(playerid, COLOR_WHITE, "You have Left the Deathmatch Or Minigame.."); } else { SendClientMessage(playerid, COLOR_WHITE, "You must be in a Deathmatch Or a Minigun before you can exit it..."); } return 1; }
Код:
if(busy[playerid] == 1) return SendClientMessage(playerid,0xAA3333AA,"Leave The Deathmatch Or Minigame Using /leave!");
Problem
is This That like i have joined The Dm using /glassdmIt says welcome to DM etc etc
And when i type any Command it says YOu need to leave the DM
And when i type the leavedm command /leave it says
it again says
Command it says YOu need to leave the DM
it means its also disabling the /leave Command
Is there any way so i can Unblock this /leave COmmand in DM
Thnx