28.08.2015, 18:10
If it doesn't work still the use this one.
Код:
COMMAND:vc(playerid, params[]) { if(playerData[playerid][playerLoggedIn]) { if(playerData[playerid][playerLevel] >= 3) { new message[128], vehName[16], vehID, Float:jX, Float:jY, Float:jZ, Float:jA; if(!sscanf(params, "s[16]", vehName)) { vehID = getVehicleModelFromName(vehName); if(vehID < 400 || vehID > 612) { SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}Unknown vehicle name provided!"); } else { GetPlayerFacingAngle(playerid, jA); GetPlayerPos(playerid, jX, jY, jZ); if(vehID == 612) { if(playerData[playerid][playerLevel] >= 6) { SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK); } else { SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}Due to the anti-cheat method this server uses, you're unable to spawn a jetpack."); } } else { for(new v = 0; v < MAX_ADMIN_SPAWNED_VEHICLES; v++) { if(!adminSpawnedVehicles[v]) { adminSpawnedVehicles[v] = CreateVehicle(vehID, jX, jY, jZ, jA, random(255), random(255), 120); LinkVehicleToInterior(adminSpawnedVehicles[v], GetPlayerInterior(playerid)); SetVehicleVirtualWorld(adminSpawnedVehicles[v], GetPlayerVirtualWorld(playerid)); ac_PutPlayerInVehicle(playerid, adminSpawnedVehicles[v], 0); format(message, sizeof(message), "{02FBF2}[ADMIN] {FFFFFF}You have spawned a %s", vehicleNames[vehID - 400]); SendClientMessage(playerid, COLOR_WHITE, message); break; } if(v == (MAX_ADMIN_SPAWNED_VEHICLES - 1)) { SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}Too many administrator vehicles have been spawned, remove some before trying again."); } } } } } else { SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}Usage: \"vc <vehicle name>\""); } } else { return 0; } } else { SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}You must be logged in to use commands."); } return 1; }