public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == PLAYER_STATE_DRIVER) { new vehmodel = GetVehicleModel(GetPlayerVehicleID(playerid)); if(vmodel == MODEL && !IsPlayerAdmin(playerid)) // change MODEL to the modelid { DestroyVehicle(GetPlayerVehicleID(playerid)); } } }
else { SendClientMessage(playerid, yourcolor, "Your not admin!"); }
Originally Posted by iLinx
Your not admin
|
C:\Documents and Settings\xxx\My Documents\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1-a)\gamemodes\x.pwn(13419) : warning 217: loose indentation C:\Documents and Settings\xxx\My Documents\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1-a)\gamemodes\x.pwn(13419) : error 029: invalid expression, assumed zero C:\Documents and Settings\xxx\My Documents\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1-a)\gamemodes\x.pwn(13419) : error 017: undefined symbol "newstate" C:\Documents and Settings\xxx\My Documents\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1-a)\gamemodes\x.pwn(13421) : error 017: undefined symbol "newstate" C:\Documents and Settings\xxx\My Documents\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1-a)\gamemodes\x.pwn(13424) : error 017: undefined symbol "vmodel" C:\Documents and Settings\xxx\My Documents\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1-a)\gamemodes\x.pwn(13423) : warning 204: symbol is assigned a value that is never used: "vehmodel" C:\Documents and Settings\xxx\My Documents\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1-a)\gamemodes\x.pwn(13423 -- 13435) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
#include a_samp
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new vehmodel = GetVehicleModel(GetPlayerVehicleID(playerid));
if(vmodel == MODEL && !IsPlayerAdmin(playerid)) // change MODEL to the modelid
{
DestroyVehicle(GetPlayerVehicleID(playerid));
return 1;
}
else return SendClientMessage(playerid, 0xFFFFFFAA, "You're not an Admin!");
}