29.01.2015, 13:53
Hello everyone, it ,how I would be able to solve it ,that if the player dm into a zone is let the exitdm be unable to use an other command apart from a command then?
Код:
CMD:exitdm(playerid, params[]) { if(dmid[playerid] == -1) return SendClientMessage(playerid,COLOR_RED, "Nem hasznбlhatod ezt a parancsot ,mert nem vagy DM-ben!"); dmid[playerid] = -1; SpawnPlayer(playerid); return SendClientMessage(playerid,COLOR_GREEN,"Kilйptйl a DM zуnбbуl!"); }
Код:
CMD:sawndm(playerid, params[]) { dmid[playerid] = 0; // Azonosнtуszбm megadбsa FONTOS SpawnPlayer(playerid); // Jбtйkos lespawnolбsa SendClientMessage(playerid,COLOR_GREEN,"Csatlakoztбl a Sawn DM-hez!"); new pName[30], string[128]; GetPlayerName(playerid, pName, 30); format(string, 256, "{00ff00}[DM-TELEPORT]:{F97C00} %s elteleportбlt a Sawn DM-be. ( /sawndm )", pName); SendClientMessageToAll(0xFF9933AA,string); return 1; }
Код:
public OnPlayerSpawn(playerid) { switch(dmid[playerid]) { case 0: // 0-бs azonosнtуszбmъ dm zуnбhoz tartozу tevйkenysйgek { SetPlayerPos(playerid,-3247.9622,30.2630,1001.6566); // Elhelyezйs a dMben. Itt akбr vйletlenszeru spawnot is нrhatunk, de az бtlбthatуsбg kedvййrt maradjunk ennйl SetPlayerFacingAngle(playerid,0); // Jбtйkos нrбnyba бllнtбsa; elforgatбs ResetPlayerWeapons(playerid); // fegyverek elvйtele <- FONTOS GivePlayerWeapon(playerid,26,5000); // Felfegyverzйs SetPlayerVirtualWorld(playerid,10); // бthelyezйs mбsi VW-be } .......