18.09.2015, 04:46
(
Последний раз редактировалось 99fe3rnando; 18.09.2015 в 05:22.
)
PHP код:
if (strcmp(cmd, "/respawncarros", true) == 0) {
if (IsPlayerConnected(playerid)) {
if (PlayerInfo[playerid][pAdmin] < 3) {
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a usar este comando!");
return true;
}
GetPlayerName(playerid, playername, sizeof(playername));
if (admtrampando[playerid] == 1 && admhide[playerid] == 1) {
format(string, sizeof(string), "[Atenзгo] Todos os carros foram para seus locais de inicio. By: ADM_OCULTO ");
} else {
format(string, sizeof(string), "[Atenзгo] Todos os veнculos foram para seus locais de inicio. By: %s.", playername);
}
SendClientMessageToAll(COLOR_LIGHTRED, string);
new bool: unwanted[CAR_AMOUNT];
for (new player = 0; player < MAX_PLAYERS; player++) {
if (IsPlayerConnected(player) && IsPlayerInAnyVehicle(player)) {
unwanted[GetPlayerVehicleID(player)] = true;
}
}
for (new car = 1; car <= CAR_AMOUNT; car++)
{
if (unwanted[car] == false)
{
new Float:X,Float:Y,Float:Z;
GetVehiclePos(car, X, Y, Z);
if((X < 2464.032) && (X > -326.9805) && (Y < -829.1292) && (Y > -1051.009))
{
}
else
{
SetVehicleToRespawn(car);
}
}
}
}
return 0;
}
no modo gangzones
PHP код:
//if((X < POS_X_MAX) && (X > POS_X_MIN) && (Y < POS_Y_MAX) && (Y > POS_Y_MIN))
Quote:
GangZoneCreate(Float:minx, Float:miny, Float:maxx, Float:maxy) |
================================================== ======