20.11.2011, 21:45
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/resetnonused", cmdtext, true, 10) == 0)
{
if(!IsPlayerAdmin(playerid)) SendClientMessage(playerid,-1,"Vocк nгo esta logado na Rcon");
for(new i = 0; i < MAX_VEHICLES; ++i)
{
if(!IsVehicleOccupied(i))
{
SetVehicleToRespawn(i);
}
}
}
return 0;
}
pawn Код:
stock IsVehicleOccupied(vehicleid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
return 1;
return 0;
}