25.09.2014, 09:53
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if( oldstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_DRIVER)
{
if(IsAdminv(GetPlayerVehicleID(playerid)))
{
if(PlayerInfo[playerid][Admin] < 1)
{
new vehicleid;
vehicleid= GetPlayerVehicleID(playerid);
DestroyVehicle(vehicleid);
SendClientMessage(playerid, 0xFF0000FF, ""RED"ERROR:"GREY" Unauthorized Vehicle");
}
}
}
return 1;
}
stock IsAdminv(vehicleid)
{
new result;
new model = GetVehicleModel(vehicleid);
switch(model)
{
case 425, 432, 447, 430, 449, 476, 520, 537, 538, 569, 570, 577, 590, 592, 610: result = model;
default: result = 0;
}
return result;
}
please help me
thanks in advance