27.01.2015, 15:34
Hello ,
This is /veh's CMD in my GM [RP].
But there's a problem.
When I respawn a vehicle like Cheetah, I want to get in them but it returns me and stops doing CMD with MSG : This Vehicle is restricted to the FBI.
What I have to do?
CMD: (/veh)
This is /veh's CMD in my GM [RP].
But there's a problem.
When I respawn a vehicle like Cheetah, I want to get in them but it returns me and stops doing CMD with MSG : This Vehicle is restricted to the FBI.
What I have to do?
CMD: (/veh)
Код:
CMD:veh(playerid, params[]) { new vid[128], c1, c2; if(PlayerInfo[playerid][pAdmin] >= 3) { if(!sscanf(params, "s[128]I(-1)I(-1)", vid, c1, c2)) { new car = ReturnVehicleModelID(vid); if(!car) {return SendClientMessage(playerid, COLOR_GREY, " Invalid vehicle model name/ID.");} if(IsPlayerInAnyVehicle(playerid)) {RemovePlayerFromVehicle(playerid);} if(c1 != -1) { if(c1 < 0 || c1 > 200) {return SendClientMessage(playerid, COLOR_GREY, " Enter a valid color [0-200]");} if(c2 == -1) {c2 = c1;} } if(c2 != -1) { if(c2 < 0 || c2 > 200) {return SendClientMessage(playerid, COLOR_GREY, " Enter a valid color [0-200]");} } new Float:X, Float:Y, Float:Z, Float:A; GetPlayerPos(playerid, X,Y,Z); GetPlayerFacingAngle(playerid,A); new carid = CreateStaticVehicle(car, X,Y,Z,A, c1, c2, -1); if(strval(tmp) != 1) { gDestroyVehicle[carid] = 1; } gCarLock[carid] = 0; StartCar(carid); engineOn[carid] = 1; PutPlayerInVehicle(playerid,carid,0); LinkVehicleToInterior(carid,GetPlayerInterior(playerid)); UnLockCar(carid); for(new i = 0; i < sizeof(CreatedCars); i++) { if(CreatedCars[i] == INVALID_VEHICLE_ID) { CreatedCars[i] = carid; break; } } } else { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /veh [vehicle name/ID] [color1(optional)] [color2(optional)] [respawnable(optional)]"); } } else { SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use this command."); } return 1; }