15.09.2012, 05:19
Tente
pawn Code:
new NaDM[MAX_PLAYERS];
public OnPlayerCommandText(playerid,cmdtext[])
{
if(NaDM[playerid] == 1 && strcmp(cmdtext, "/sairdm", true) != 0)
{
SendClientMessage(playerid, -1,"[ERRO] Vocк estб na DM e sу pode digitar o comando /sairdm");
return 0;
}
if(strcmp(cmdtext, "/minigun", true) == 0)
{
NaDM[playerid] = 1;
SetPlayerPos(playerid,283.6217,-136.7550,1004.0625);
new pname[MAX_PLAYER_NAME];
SetPlayerInterior(playerid,7);
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "{FF0000}%s {FFFFFF}foi na batalha de minigun {FF0000}( /minigun )", pname);
SendClientMessageToAll(COLOR_BRANCA, string);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 38, 99999);
return 1;
}
if(strcmp(cmdtext, "/sairdm", true) == 0)
{
if(NaDM[playerid] == 0) return SendClientMessage(playerid, -1, "[ERRO] Vocк nгo estб na DM");
SendClientMessage(playerid, -1, "[ SERV ] Voce saiu da DM.");
SetPlayerPos(playerid, CordX, CordY, CordZ);
NaDM[playerid] = 0;
return 1;
}
return 0;
}