29.08.2011, 14:09
pawn Код:
//Final do GameMode
stock IsPlayerInArena(playerid)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
if(x >= 1271.44 && y >= 2092.145 && x <= 1384.68 && y <= 2208.187) return true; //Troque pela suas coordenadas
else return false;
}
// comando
if(strcmp(cmdtext,"/sair",true)==0)
{
if(!IsPlayerInArena(playerid)) return SendClientMessage(playerid, -1, "Vocк nгo estб em uma arena");
BlockCMD[playerid] = false;
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 99999);
GivePlayerWeapon(playerid, 28, 99999);
GivePlayerWeapon(playerid, 26, 99999);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,0);
GameTextForPlayer(playerid,"",4000,6);
SetPlayerInterior(playerid,0);
new rand = random(sizeof(RandomSpawns));
SetPlayerPos(playerid, RandomSpawns[rand][0], RandomSpawns[rand][1],RandomSpawns[rand][2]);
SetPlayerFacingAngle(playerid, RandomSpawns[rand][3]);
SetPlayerInterior(playerid,0);
SetPlayerWorldBounds(playerid,20000.0000,-20000.0000,20000.0000,-20000.0000);
SetPlayerInterior(playerid,0);
return 1;
}