if(strcmp(cmd, "/slon", true) == 0)
{
new VID2 = governcar[2];
if(Siren[VID2] == false)//nooo
{
format(string, sizeof(string), "* %s a pus sirena pe masina.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
new govern2 = CreateObject(18646,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(govern2,governcar[2],...........); //Object Model: 18646 |
Siren[VID2] = true;
}
else if(Siren[VID2] == true)
{
format(string, sizeof(string), "* %s a dat jos sirena pe masina.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
DestroyObject(govern2[VID2]); //old way,any errors?nope
Siren[VID2] = false;
}
return 1;
}
new govern2 = CreateObject(18646,0,0,-1000,0,0,0,100);
DestroyObject(govern2);
new govern2[ MAX_PLAYERS ];
govern2[ playerid ] = CreateObject( ... );
DestroyObject( govern2[ playerid ] );
if(strcmp(cmd, "/gon", true) == 0) { if (PlayerInfo[playerid][pLeader] == 7) { new VID3 = governcar[3]; if(Siren[VID3] == false) { format(string, sizeof(string), "* %s a pus girofarul pe masina.", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE); govern3[playerid] = CreateObject(.....); AttachObjectToVehicle(govern3[playerid],governcar[3],......); //Object Model: 18646 | Siren[VID3] = true; } else if(Siren[VID3] == true) { format(string, sizeof(string), "* %s a luat girofarul de pe masina.", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE); DestroyObject(govern3[playerid]); Siren[VID3] = false; } } return 1; } |