if(!IsPlayerAdmin(playerid))
//CAR ID 411,-2785.1904,-281.8809,6.9040,179.6995 451,-2780.1123,-282.0823,6.9065,180.2454 451,-2775.1873,-281.9308,6.9116,179.9936 506,-2770.1301,-282.2701,6.9162,181.7645 521,-2765.3083,-282.1704,6.9140,180.7020 521,-2760.4446,-282.5269,6.9035,179.9817 522,-2755.5747,-282.3442,6.9089,179.9077
Originally Posted by BLACK-RIDER-1692
code plz!!!
give me admin car pwn code Admin Variable: Код:
if(!IsPlayerAdmin(playerid)) |
#define MAX_ADMIN_VEHICLES 7
new AdminVehicles[MAX_ADMIN_VEHICLES];
IsAdminVehicle(vehicleid)
{
for (new i = 0; i < MAX_ADMIN_VEHICLES; i++)
if (AdminVehicles[i] == vehicleid)
return 1;
return 0;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if (newstate == 2 && oldstate == 1)
{
if (!IsPlayerAdmin(playerid) && IsAdminVehicle(GetPlayerVehicleID(playerid)))
{
SendClientMessage(playerid, 0xCC0000FF, "This is an admin only vehicle!");
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
}
}
return 1;
}
OnGameModeInit()
{
AdminVehicles[0] = CreateVehicle(411,-2785.1904,-281.8809,6.9040,179.6995, 0, 0, 1000);
AdminVehicles[1] = CreateVehicle(451,-2780.1123,-282.0823,6.9065,180.2454, 0, 0, 1000);
AdminVehicles[2] = CreateVehicle(451,-2775.1873,-281.9308,6.9116,179.9936, 0, 0, 1000);
AdminVehicles[3] = CreateVehicle(506,-2770.1301,-282.2701,6.9162,181.7645, 0, 0, 1000);
AdminVehicles[4] = CreateVehicle(521,-2765.3083,-282.1704,6.9140,180.7020, 0, 0, 1000);
AdminVehicles[5] = CreateVehicle(521,-2760.4446,-282.5269,6.9035,179.9817, 0, 0, 1000);
AdminVehicles[6] = CreateVehicle(522,-2755.5747,-282.3442,6.9089,179.9077, 0, 0, 1000);
return 1;
}