Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forward SQL_CallVehicleCreate(playerid, model, Float:x, Float:y, Float:z, Float:a, color1, color2);
- public SQL_CallVehicleCreate(playerid, model, Float:x, Float:y, Float:z, Float:a, color1, color2)
- {
- new string[128];
- for(new i; i < MAX_VEHICLES; i++)
- {
- if(vInfo[i][vExist]) continue;
- vInfo[i][vSQL] = cache_insert_id();
- vInfo[i][vModel] = model;
- vInfo[i][vColor1] = color1;
- vInfo[i][vColor2] = color2;
- vInfo[i][vPosX] = x;
- vInfo[i][vPosY] = y;
- vInfo[i][vPosZ] = z;
- vInfo[i][vPosA] = a;
- SetPlayerPos(playerid, x+2, y+2, z);
- vInfo[i][vExist] = true;
- //vInfo[i][vID] = CreateVehicle(vInfo[i][vModel], vInfo[i][vPosX], vInfo[i][vPosY], vInfo[i][vPosZ], vInfo[i][vPosA], vInfo[i][vColor1], vInfo[i][vColor2], -1, 0);
- vInfo[i][vID] = AddStaticVehicle(vInfo[i][vModel], vInfo[i][vPosX], vInfo[i][vPosY], vInfo[i][vPosZ], vInfo[i][vPosA], vInfo[i][vColor1], vInfo[i][vColor2]);
- format(string, sizeof(string), "{ff709d}[ADMIN] {70bcff}Création du véhicule SQLid : {FFFFFF}%d ", cache_insert_id());
- SendClientMessage(playerid, -1, string);
- format(vInfo[i][vPlaque], 32, "AUCUNE");
- new Text3D:vehicle3dtext[MAX_VEHICLES];
- vehicle3dtext[vInfo[i][vID]] = Create3DTextLabel("test", -1, 0.0, 0.0, 0.0, 50.0, 0, 1);
- Attach3DTextLabelToVehicle(vehicle3dtext[vInfo[i][vID]], vInfo[i][vID], -0.7, -1.9, -0.3);
- new string5[256];
- format(string5, sizeof string5, "%s", vInfo[i][vPlaque]);
- Update3DTextLabelText(vehicle3dtext[vInfo[i][vID]], -1, string5);
- Attach3DTextLabelToVehicle(vehicle3dtext[vInfo[i][vID]], vInfo[i][vID], -0.7, -1.9, -0.3);
- new stringplaque[7];
- format(stringplaque, sizeof(stringplaque), "%s", vInfo[i][vPlaque]);
- SetVehicleNumberPlate(i, stringplaque);
- SetVehicleToRespawn(i);
- break;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement