13.09.2012, 22:05
I have been coding this new Code for /flash where it places a sliding neon light blue and red above a cruiser. I have that working but i need the lights to change. I have tried to settimer etc, but i have come to no prevail.
Код:
if (strcmp("/flash", cmdtext, true, 6) == 0)
{
if (GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
if(PlayerInfo[playerid][pMember] == Police || PlayerInfo[playerid][pLeader] == Police)
{
return SendClientMessage(playerid, -1, "* You Are Not The Driver");
}
new pveh = GetPlayerVehicleID(playerid);
if (!GetVehicleModel(pveh)) return SendClientMessage(playerid, -1, "> You are not in a State vehicle");
if (VObject(obj[pveh])) return format(string, sizeof(string), ">%s reaches over to their dashboard and flicks the code 2 lights off", sendername);
ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
switch (GetVehicleModel(pveh))
{
case 596:
{
obj[pveh] = CObject(19419, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
AObject(obj[pveh], pveh, 0.000000, -0.379999, 0.889999, 0.000000, 0.000000, 0.000000);
}
case 597:
{
obj[pveh] = CObject(19419, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
AObject(obj[pveh], pveh, 0.000000, -0.374999, 0.884999, 0.000000, 0.000000, 0.000000);
}
case 598:
{
obj[pveh] = CObject(19419, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
AObject(obj[pveh], pveh, 0.000000, -0.334498, 0.933500, 0.000000, 0.000000, 0.000000);
}
case 599:
{
obj[pveh] = CObject(19419, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
AObject(obj[pveh], pveh, 0.000000, 0.039999, 1.153999, 0.000000, 0.000000, 0.000000);
}
default:
{
return SendClientMessage(playerid, -1, "> You are not in a State Vehicle");
}
}
return format(string, sizeof(string), ">%s reaches over to their dashboard and flicks the code 2 lights ON", sendername);
ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}

