else if (strcmp("/park", cmde, true, 10) == 0) { if (IsPlayerInVehicle(playerid,Carlist[playerid][Carid])) { GetVehiclePos(Carlist[playerid][Carid],Carlist[playerid][X],Carlist[playerid][Y],Carlist[playerid][Z]); GetVehicleZAngle(Carlist[playerid][Carid],Carlist[playerid][Rotation]); SendClientMessage(playerid, COLOR_GREEN, "[INFO:] Your vehicle will now respawn here."); SaveDynamicCars(); } else { SendClientMessage(playerid, COLOR_GREY, "[ERROR:] That is not your car, or you are not in one!"); } return 1; } |
if(strcmp(cmd, "/acarpark", true) == 0) { if(IsPlayerConnected(playerid)) { if (PlayerInfo[playerid][pAdmin] >= 5) { if(IsPlayerInAnyVehicle(playerid)) { new vehicleid = GetPlayerVehicleID(playerid); new car = GetPlayerVehicleID(playerid) - 1; new Float,Float:y,Float:z; new Float:a; GetVehiclePos(vehicleid, x, y, z); GetVehicleZAngle(vehicleid, a); DynamicCars[car][CarX] = x; DynamicCars[car][CarY] = y; DynamicCars[car][CarZ] = z; DynamicCars[car][CarAngle] = a; DestroyVehicle(vehicleid); CreateVehicle(DynamicCars[car][CarModel],DynamicCars[car][CarX],DynamicCars[car][CarY],DynamicCars[car][CarZ],DynamicCars[car][CarAngle],DynamicCars[car][CarColor1],DynamicCars[car][CarColor2], -1); PutPlayerInVehicle(playerid,vehicleid,0); SaveDynamicCars(); new wstring[128]; format(wstring, sizeof(wstring), "You have parked Vehicle ID: %d.", vehicleid); SendClientMessage(playerid,COLOR_ADMINCMD, wstring); } else { SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Your not in a vehicle!"); } } else { SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Your not an administrator."); } } return 1; } |