native GetPlayersName(playerid)
native SetPlayerPositionEx(playerid, Float, Float:y, Float:z, Float:angle, vworld, interior) native TeleportPlayerToPlayer(playerid, targetid) native TeleportCarToPlayer(vehicleid, playerid) native TeleportPlayerToCar(playerid, vehicleid) native GetPlayerIPAddress(playerid) native HealPlayer(playerid) native KillPlayer(playerid) native CrashPlayer(playerid) native GivePlayerHealth(playerid, Float:health) native TakePlayerHealth(playerid, Float:health) native GivePlayerArmour(playerid, Float:armour) native TakePlayerArmour(playerid, Float:armour) native GivePlayerScore(playerid, score) native TakePlayerScore(playerid, score) native GiveScoreFromPlayerToPlayer(playerid, targetid, score) native GiveCashFromPlayerToPlayer(playerid, targetid, amount) native BankruptPlayer(playerid) native SetPlayerCash(playerid) native SlapPlayer(playerid) native IsPlayerSwimming(playerid) native IsPlayerFalling(playerid) native IsPlayerInModdingShop(playerid) native GetVehicleType(modelid) stock GetPlayerVehicleSpeed(playerid) native ExplodePlayer(playerid) native IsPlayerAiming(playerid) native GetWeaponNameByID(weaponid) native GetWeaponIDByName(weaponname[]) native GetWeaponSlotByID(weaponid) native GetPlayerArmedWeaponAmmo(playerid) native GetVehicleNameByModel(model) native GetWeatherName(weatherid) native LoadObjectsFromFile(const filename[]) native LoadVehiclesFromFile(const filename[]) native CreateLogEntry(log[], text[]) native HealAll() native ArmourAll() native FreezeAll() native DisarmAll() native GiveWeaponToAll(weaponid, ammo) native GiveCashToAll(cash) native GiveScoreToAll(score) native UnfreezeAll() native GetOnlinePlayersCount() native GetValidVehiclesCount() |
#define TYPE_INVALID -1
#define TYPE_AIRPLANE 0
#define TYPE_HELICOPTER 1
#define TYPE_BIKE 2
#define TYPE_CONVERTIBLE 3
#define TYPE_INDUSTRIAL 4
#define TYPE_LOWRIDER 5
#define TYPE_OFFROAD 6
#define TYPE_PUBLIC 7
#define TYPE_SALOON 8
#define TYPE_SPORT 9
#define TYPE_STATION 10
#define TYPE_BOAT 11
#define TYPE_TRAILER 12
#define TYPE_UNIQUE 13
#define TYPE_RC 14
Just throwing in my five cents here:
|
stock GetValidVehiclesCount()
{ new count; for(new x = 0; x < MAX_VEHICLES; x++) { if(x != INVALID_VEHICLE_ID) { count++; } } return count; } Are you sure that works? How can a static, defined number equal a dynamic number in a for loop? |
stock GetValidVehiclesCount()
{
new count;
for(new x = 1; x <= MAX_VEHICLES; x++)
{
switch(GetVehicleModel(x))
{
case 400..611: count++;
default: continue;
}
}
return count;
}
PHP код:
|