16.08.2011, 19:44
pawn Код:
if(strcmp(cmdtext, "/baron", true) == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerInVehicle(i, baron1)) return SendClientMessage(playerid, COLOR_ADMIN, "alguien estб usando el Baron, espere un momento.");
if(GetPlayerLevel(playerid) < 2) return SendClientMessage(playerid, COLOR_RED, "SERVER: Vos no sos moderador para usar ese comando!");
if(!IsPlayerInRangeOfPoint(playerid, 10, 1044.9265,1011.7687,55.3047)) return SendClientMessage(playerid, COLOR_ADMIN, "Tiene que estar cerca del baron!");
GetPlayerFacingAngle(playerid, aP);
GetPlayerPos(playerid, xP, yP, zP);
baron1 = AddStaticVehicle(464, xP, yP, zP, 186, 186, 1);
PutPlayerInVehicle(playerid, baron1, 0);
SetVehicleHealth(baron1, 400);
return 1;
}
if(strcmp(cmdtext, "/sbaron", true) == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerInVehicle(i, baron1)) return SendClientMessage(playerid, COLOR_ADMIN, "alguien estб usando el Baron, espere un momento.");
if(IsPlayerInVehicle(playerid, baron1))
DestroyVehicle(baron1);
return 1;
}