08.08.2015, 16:51
So on my server vips have the ability to spawn a VIP car(Infernus),how can i make a red tag(message) on the vehicle to say VIP Car,example on Roleplay how it says on organization cars,and how to make the cars spawn in black color? REP +1 who helps.
My command to spawn the vehicle
My command to spawn the vehicle
PHP код:
COMMAND:vauto(playerid, params[])
{
if (APlayerData[playerid][VIPLevel] >= 1 && APlayerData[playerid][LoggedIn] == true)
{
SendAdminText(playerid, "/vAuto", params);
{
// Setup local variables
new Float:x, Float:y, Float:z, Float:rot, vID;
new engine,lights,alarm,doors,bonnet,boot,objective;
// Get the player's position and name
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, rot);
// Spawn the vehicle based on the selection in the list with a random color
// Also set max-fuel and save the model for the vehicle
vID = Vehicle_Create(411, x, y, z, rot, random(126), random(126), 600);
// Put the player in the vehicle
PutPlayerInVehicle(playerid, vID, 0);
// Turn on the engine and lights
GetVehicleParamsEx(vID, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vID, 1, 1, alarm, doors, bonnet, boot, objective);
// Store the player's current location and interior-id, otherwise anti-airbreak hack code could kick you
GetPlayerPos(playerid, APlayerData[playerid][PreviousX], APlayerData[playerid][PreviousY], APlayerData[playerid][PreviousZ]);
APlayerData[playerid][PreviousInt] = GetPlayerInterior(playerid);
}
}
return 1;
}
COMMAND:vmotor(playerid, params[])
{
if (APlayerData[playerid][VIPLevel] >= 1 && APlayerData[playerid][LoggedIn] == true)
{
SendAdminText(playerid, "/vmotor", params);
// Setup local variables
new Float:x, Float:y, Float:z, Float:rot, vID;
new engine,lights,alarm,doors,bonnet,boot,objective;
// Get the player's position and name
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, rot);
// Spawn the vehicle based on the selection in the list with a random color
// Also set max-fuel and save the model for the vehicle
vID = Vehicle_Create(522, x, y, z, rot, random(126), random(126), 600);
// Put the player in the vehicle
PutPlayerInVehicle(playerid, vID, 0);
// Turn on the engine and lights
GetVehicleParamsEx(vID, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vID, 1, 1, alarm, doors, bonnet, boot, objective);
// Store the player's current location and interior-id, otherwise anti-airbreak hack code could kick you
GetPlayerPos(playerid, APlayerData[playerid][PreviousX], APlayerData[playerid][PreviousY], APlayerData[playerid][PreviousZ]);
APlayerData[playerid][PreviousInt] = GetPlayerInterior(playerid);
}
return 1;
}