10.02.2013, 14:26
pawn Код:
COMMAND:sirenson2(playerid, params[])
{
new VehModel; //Okay you created a new varialbe to hold the VehModel, but it's not set to anything, so it's 0
if(GetVehicleModel(VehModel) == 460) //Hold on? We're checking the vehicle model of VehModel which is 0?
{
new VehID; //Okay we're making a new variable for the vehicle id
VehID = GetPlayerVehicleID(playerid); //Storing it
GetPlayerVehicleID(playerid); //Why are we calling it twice?
AttachObjectToVehicle(obj1, VehID, -5.025067, 0.389999, 1.184999, -2.010001, 0.000000, 0.000000);
AttachObjectToVehicle(obj2, VehID, 4.600057, 0.374999, 1.164999, 0.000000, 0.000000, 0.000000);
AttachObjectToVehicle(obj3, VehID, 0.000000, 2.365006, 0.559999, 0.000000, 0.000000, 0.000000);
SendClientMessage(playerid, COLOR_BLUE, "I don't get this message.");
}
return 1;
}
pawn Код:
COMMAND:sirenson2(playerid, params[])
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_BLUE, "You need to be in a vehicle to use that command!"); //Send a error message if they're not in a vehicle
else //Else they are
{
new VehID = GetPlayerVehicleID(playerid); //Get the vehicleid of the vehicle they're driving
if(GetVehicleModel(VehID) == 460) //If the vehicleid's model is 460
{
AttachObjectToVehicle(obj1, VehID, -5.025067, 0.389999, 1.184999, -2.010001, 0.000000, 0.000000);
AttachObjectToVehicle(obj2, VehID, 4.600057, 0.374999, 1.164999, 0.000000, 0.000000, 0.000000);
AttachObjectToVehicle(obj3, VehID, 0.000000, 2.365006, 0.559999, 0.000000, 0.000000, 0.000000);
SendClientMessage(playerid, COLOR_BLUE, "I don't get this message.");
}
}
return 1;
}