07.05.2014, 14:03
i have a command to create vehicle /createveh
it runs fine if i only type /createveh which shows usage but when i type /createveh 411 10 10 then it creates vehicle infernus but also shows SERVER: unknown command
I have similar command like this to create faction that works fine without any problems
Any help please
Код:
CMD:createveh(playerid, params[]) { if(PlayerInfo[playerid][Admin] < A_createveh) return SendClientMessage(playerid, COLOR_RED, "Your admin privileges are not high enough for this action."); new carid, rent, price, col, col2; if(sscanf(params, "dddD(-1)D(-1)", carid, price, rent, col, col2)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /createveh <model id> <price> <rent price> <color> <color 2>"); if(carid < 400 || carid > 611) return SendClientMessage(playerid, COLOR_RED, "You have entered an invalid model id."); if(price == 0) return SendClientMessage(playerid, COLOR_RED, "Enter price of vehicle."); new Float:x, Float:y, Float:z, Float:ang; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, ang); for(new i = 0; i < MAX_CARS; i++) { if(VehInfo[i][Exists] == true) continue; VehInfo[i][Model] = carid; VehInfo[i][X] = x; VehInfo[i][Y] = y; VehInfo[i][Z] = z; VehInfo[i][Angle] = ang; VehInfo[i][Color] = col; VehInfo[i][Color2] = col2; VehInfo[i][Ownable] = 1; VehInfo[i][Price] = price; VehInfo[i][RentPrice] = rent; VehInfo[i][Owned] = 0; VehInfo[i][Rented] = 0; VehInfo[i][Locked] = 0; VehInfo[i][VehId] = CreateVehicle(carid, x-3, y, z, ang, col, col2, 60); new text[300]; format(text, sizeof(text), "Model: %s\n", VehicleNames[VehInfo[i][Model]]); VehInfo[i][Text] = Create3DTextLabel(text, COLOR_GREEN, VehInfo[i][X], VehInfo[i][Y], VehInfo[i][Z], 40, 0); Attach3DTextLabelToVehicle(VehInfo[i][Text], VehInfo[i][VehId], 0, 2, 0); SaveCars(i); break; } return 1; }
I have similar command like this to create faction that works fine without any problems
Any help please