16.02.2014, 20:51
I'm trying to make it so if you are in you're vehicle slot 1 it creates neon for that car, then if in vehicle slot 2 it creates neon for your second car... and what i have now is not working... it causes a bunch of errors in my script for things not even related to it. :/ please help me...
Will +rep
Will +rep
pawn Код:
if(strcmp(option1, "cyan", true, 6) == 0)
{
else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pVeh])
{
DestroyObject(GetPVarInt(playerid, "nb1"));
DestroyObject(GetPVarInt(playerid, "nb2"));
DestroyObject(GetPVarInt(playerid, "nb3"));
DestroyObject(GetPVarInt(playerid, "nb4"));
DestroyObject(GetPVarInt(playerid, "nb6"));
SetPVarInt(playerid, "nb5", CreateObject(18651,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "nb5"), GetPlayerVehicleID(playerid), 0.0, 0.0, -0.70, 0.0, 0.0, 0.0);
}
else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pVVeh])
{
DestroyObject(GetPVarInt(playerid, "vnb1"));
DestroyObject(GetPVarInt(playerid, "vnb2"));
DestroyObject(GetPVarInt(playerid, "vnb3"));
DestroyObject(GetPVarInt(playerid, "vnb4"));
DestroyObject(GetPVarInt(playerid, "vnb6"));
SetPVarInt(playerid, "vnb5", CreateObject(18651,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "vnb5"), GetPlayerVehicleID(playerid), 0.0, 0.0, -0.70, 0.0, 0.0, 0.0);
}
format(string, sizeof(string), "* %s pushes a button on his dash and sparks his pink neon tubes.", RPN(playerid));
SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}