Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FILTERSCRIPT
- #include <a_samp>
- #include <zcmd>
- new AdminVehicle[MAX_PLAYERS] = {INVALID_VEHICLE_ID, ...};
- CMD:acar(playerid, params[])
- {
- if(pInfo[playerid][pAdmin] >= 3)
- {
- CheckAdminVehicle(playerid);
- new Float:asdX, Float:asdY, Float:asdZ;
- GetPlayerPos(playerid,asdX, asdY, asdZ);
- AdminVehicle[playerid] = CreateVehicle(411, Float:asdX, Float:asdY, Float:asdZ, 0, 1, 1, 0);
- PutPlayerInVehicle(playerid, AdminVehicle[playerid], 0);
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- CheckAdminVehicle(playerid); //Igen, még akkor is ellenőrizzük, ha nem admin. (Hogyha időközben elvették volna az adminját akkor is törli.)
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(oldstate == PLAYER_STATE_DRIVER) CheckAdminVehicle(playerid);
- return 1;
- }
- stock CheckAdminVehicle(playerid) {
- if(AdminVehicle[playerid] != INVALID_VEHICLE_ID) {
- //Ha van neki adminjárműve..
- AdminVehicle[playerid] = INVALID_VEHICLE_ID;
- DestroyVehicle(AdminVehicle[playerid]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement