07.01.2014, 12:34
Hello i Have a problem with my deathmatch system , i have use some script to desactivate a teleports in deathmatch , so the commande for deathmatch is , /dm , and for exit /dm to , When i tape /dm and i join i can not exit with /dm to because i desactivate all commande in deathmatch so i need Help to desativate all commande ( only /dm )
Thx For help , sorry for my bad english
PHP код:
if(GetPVarInt(playerid, "InDM")) return SendClientMessage(playerid, 0xAA3333AA, "[BlackDeathmatch]:Aucune Commande N'est Autorisй en Deathmatch /dm pour quittй");
if (strcmp("/dm", cmdtext, true, 4) == 0)
{
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(InDM[playerid] == 0)
{
InDM[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE , "Vous Avez Rejoindre Le deathmatch (/dm) pour quittй");
format(String, sizeof(String), "[BlackDeathmatch]:{FFFFFF}%s(%d) A Rejoind Le Deathmatch (/dm)", PlayerName, playerid);
SendClientMessageToAll(COLOR_LIGHTBLUE, String);
SetPlayerInterior(playerid, 10);
SetPlayerVirtualWorld(playerid, 10);
new rand = random(sizeof(DMSpawns));
SetPlayerPos(playerid, DMSpawns[rand][0], DMSpawns[rand][1], DMSpawns[rand][2], DMSpawns[rand][3], DMSpawns[rand][4], DMSpawns[rand][5], DMSpawns[rand][6], DMSpawns[rand][7]);
SetPlayerFacingAngle(playerid, DMSpawns[rand][3]);
GivePlayerWeapon(playerid, 24, 999999);
GivePlayerWeapon(playerid, 26, 999999);
GivePlayerWeapon(playerid, 31, 999999);
GivePlayerWeapon(playerid, 16, 5);
SetPVarInt(playerid, "InDM", true);
}
else
{
InDM[playerid] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vous Avez Quittй Le deathmatch");
SpawnPlayer(playerid);
SetPlayerHealth(playerid, 100);
ResetPlayerWeapons(playerid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetPVarInt(playerid, "InDM", false);