forward timer();public timer(){foreach(AdminVehicles,vehicleid){ foreach(Player,playerid) { if(IsPlayerInVehicle(playerid,vehicleid)) RemovePlayerFromVehicle(playerid);}}}
OnPlayerStateChange(playerid,oldstate,newstate){ if(newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(playerid) == 579) //csak adminé { if(!IsPlayerAdmin(playerid)) //rcon admin vezetheti { RemovePlayerFromVehicle(playerid); } } return 1;}
kéne nekem egy parancs ami ara jó hogy aki nem admin kidobja az autóból ha be van kapcsolva és az autó fölöt írja hogy admin autó a segítséget elõre is köszönöm
#include < a_samp >#include < GetVehicleColor >new AdminVehicle[MAX_VEHICLES];new Text3D:KocsiText[MAX_VEHICLES];public OnFilterScriptInit( ){r_CreateVehicle( 562, 0, 0, 3, 0, 3, 4, 0 );return 1;}public OnPlayerCommandText( playerid, cmdtext[] ){if( strcmp( cmdtext, \"/adminautó\", true) == 0 ){ if( !IsPlayerAdmin(playerid) ) return SendClientMessage( playerid, -1, \"Használatához adminnak kell lenned.\" ); if( !IsPlayerInAnyVehicle(playerid) ) return SendClientMessage( playerid, -1, \"Használatához egy jármûben kell lenned.\" ); new vehicleid = GetPlayerVehicleID(playerid); if( AdminVehicle[vehicleid] == 1 ) return SendClientMessage( playerid, -1, \"Ezt a jármûvet nem alakíthatod admin autóvá.\" ); AdminVehicle[vehicleid] = 1; new Float:Pos[4]; new Model; Model = GetVehicleModel( vehicleid ); new Color, Color2; GetVehicleColor( vehicleid, Color, Color2 ); GetVehiclePos( vehicleid, Pos[0], Pos[1], Pos[2] ); GetVehicleZAngle( vehicleid, Pos[3] ); DestroyVehicle( vehicleid ); vehicleid = r_CreateVehicle( Model, Pos[0], Pos[1], Pos[2], Pos[3], Color, Color2, 0 ); SetVehicleNumberPlate( vehicleid, \"-ADMIN-\" ); PutPlayerInVehicle( playerid, vehicleid, 0 ); KocsiText[vehicleid] = Create3DTextLabel( \"Admin autó\", 0x0ff00AA, Pos[0], Pos[1], Pos[2], 15.0, 0 ); Attach3DTextLabelToVehicle( KocsiText[vehicleid], vehicleid, 0, 0, 1 ); SendClientMessage( playerid, -1, \"Ez a jármû ezentúl admin autó.\"); return 1;}return 0;}