09.12.2012, 15:44
pawn Код:
//no inicio da public OnplayerCommandText
if(strcmp(cmdtext, "/sairarena", true) == 0)
{
SendClientMessage(playerid, -1, "vocк saiu da arena!");
EstanaArena[playerid] = false;
SpawnPlayer(playerid);
return 1;
}
if(EstanaArena[playerid] == true) return SendClientMessage(playerid, -1, "Precisa sair da arena para poder usar comandos!");
//no comando!
if(strcmp(cmdtext, "/minigun", true) == 0)
{
SetPlayerPos(playerid, 1099.297119, 1063.832275, 10.156986);
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s foi na batalha de {FF00FF}minigun {FF0000}( /minigun )", pname);
SendClientMessageToAll(COLOR_YELLOW, string);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 38, 99999);
EstanaArena[playerid] = true;
return 1;
}
//onplayerdeath
if(EstanaArena[playerid] == true)
{
SendClientMessage(playerid, -1, "vocк Morreu e saiu da arena!");
EstanaArena[playerid] = false;
}