06.12.2015, 00:12
Hello guys, i've been working on something cool for a while now.
I've created a vehicle system that stores the vehicles in a mysql database, and spawns them if a player gets in range, destroys them when a player is not.
anyways,
I'm struggeling with the command to park a vehicle.
If your not in a vehicle it should send a message saying you have to be in a vehicle.
But its saying [Server] You have succesfully parked Vehicle ID: 0 Instead of the other message.
So i was wondering if anyone could help me out with that.
the current code i have is
I've created a vehicle system that stores the vehicles in a mysql database, and spawns them if a player gets in range, destroys them when a player is not.
anyways,
I'm struggeling with the command to park a vehicle.
If your not in a vehicle it should send a message saying you have to be in a vehicle.
But its saying [Server] You have succesfully parked Vehicle ID: 0 Instead of the other message.
So i was wondering if anyone could help me out with that.
the current code i have is
Код:
case 3: { if(!IsNull(string)) return SEM(playerid,"{ff387a}[Admin]:{ffffff} /vehicle park - You must be in the Vehicle"); new vehicleid = GetPlayerVehicleID(playerid), currvehicleid = GetPlayerVehicleID(playerid); if(Iter_Contains(Vehicles,vehicleid)) { GetVehiclePos(currvehicleid, ServerVehicle[vehicleid][Spawn][0], ServerVehicle[vehicleid][Spawn][1], ServerVehicle[vehicleid][Spawn][2]); GetVehicleZAngle(currvehicleid, ServerVehicle[vehicleid][Spawn][3]); format(string,sizeof(string),"{ff387a}[Admin]:{ffffff} Vehicle with {ffff00}id %d {ffffff}has been parked!",vehicleid); SendClientMessage(playerid,COLOR_WHITE,string); orm_update(ServerVehicle[vehicleid][ORM_ID]); } else SEM(playerid,"{ff0000}[Error]:{ffffff} Invalid vehicle!"); }