Bogdy RPG Posted September 7, 2019 Posted September 7, 2019 Salut , ma puteti ajuta cu o commanda de spawncar buna ? pt ca am incercat multe si imi da erori si daca puteti sa imi scrieti daca imi trebuie ceva filescripts sau plugins Quote
RedGun Posted September 7, 2019 Posted September 7, 2019 (edited) Adaugi in gamemode comanda urmatoare. CMD:spawncar(playerid, params[]) { // aici faci verificarea daca are admin (nu stiu cum ai tu numele variabilelor dar banuiesc ca stii sa editezi). if(playerVariables[playerid][pAdminLevel] < 1) return 1; // in caz ca nu ai is_null definita, adauga asta la inceputul scriptului: #define is_null(%1) ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1])))) if(is_null(params)) return SendClientMessage(playerid, -1, "Syntax: /spawncar [vehicleid]"); new model = strval(params); if(model < 400 || model > 611) return SendClientMessage(playerid, -1, "Valid car IDs start at 400, and end at 611."); new Float:my_pos[4]; GetPlayerPos(playerid, my_pos[0], my_pos[1], my_pos[2]); GetPlayerFacingAngle(playerid, my_pos[3]); new v = CreateVehicle(model, my_pos[0], my_pos[1], my_pos[2], my_pos[3], random(256), random(256), 0, 0); if(v == INVALID_VEHICLE_ID) { SendClientMessage(playerid, -1, "Sunt prea multe masini pe server [ERROR]."); return 1; } PutPlayerInVehicle(playerid, v, 0); new text[100]; format(text, sizeof(text), "Ai spawnat masina cu modelul %d.", model); SendClientMessage(playerid, -1, text); return 1; } Edited September 7, 2019 by RedGun Quote
ReloadK Posted October 10, 2019 Posted October 10, 2019 te folosesti de getplayerpos, de createvehicle, si de putplayerinvehicle Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.