15.10.2012, 16:08
The script that I use:My DM
Description of the problem:Can anyone give me an example of how to create a command that player who enter my islanddeathmatch cant type any command like /vehicle /weapons and other only can chat ...Then when he type /leavedm he get out..I make simple /leavedm but dont know how to make checking whether there is command if so, when the command to kick him out, and if not in deathmatch could not use the command.
Sorry for bad english,not my basic lang.. :S
Part of script(islanddm command):
Part of script(leave command):
Description of the problem:Can anyone give me an example of how to create a command that player who enter my islanddeathmatch cant type any command like /vehicle /weapons and other only can chat ...Then when he type /leavedm he get out..I make simple /leavedm but dont know how to make checking whether there is command if so, when the command to kick him out, and if not in deathmatch could not use the command.
Sorry for bad english,not my basic lang.. :S
Part of script(islanddm command):
Код:
CMD:islanddm(playerid, params[]) { new string[128], pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, MAX_PLAYER_NAME); SetTimerEx("Unfreeze", 2000, 0, "d", playerid); GameTextForPlayer(playerid,"~g~Waiting for the Objects to load",2000,3); format(string, sizeof(string), "{FF0000}(/islanddm) {FFFF00}Player {FF0000}%s {FFFF00}has Teleported to {FF0000}Island DeathMatch",pName); SendClientMessageToAll(playerid, string); new Random = random(sizeof(RandomSpawnIslandDM)); SetPlayerPos(playerid, RandomSpawnIslandDM[Random][0], RandomSpawnIslandDM[Random][1], RandomSpawnIslandDM[Random][2]); }
Код:
CMD:leavedm(playerid, params[]) { new Random = random(sizeof(RandomSpawnLEAVEDM)); SetPlayerPos(playerid, RandomSpawnLEAVEDM[Random][0], RandomSpawnLEAVEDM[Random][1], RandomSpawnLEAVEDM[Random][2]); // Place the X Y Z of the position where they player will be when they type this command SendClientMessage(playerid, COLOR_RED, "You have left the Deathmatch Area"); return 1; }