Siren Problem
#1

i type /slon every thing is perfect.puts on the siren.i cant take it off..

PHP код:
if(strcmp(cmd"/slon"true) == 0)
                    {
                    new 
VID2 governcar[2];
                    if(
Siren[VID2] == false)//nooo
                    
{
                        
format(stringsizeof(string), "* %s a pus sirena pe masina."sendername);
                        
ProxDetector(30.0playeridstringCOLOR_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(stringsizeof(string), "* %s a dat jos sirena pe masina."sendername);
                        
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        
DestroyObject(govern2[VID2]); //old way,any errors?nope
                        
Siren[VID2] = false;
                    }
                    return 
1;
                    } 
Reply
#2

Just try:
Look at this
pawn Код:
new govern2 = CreateObject(18646,0,0,-1000,0,0,0,100);
pawn Код:
DestroyObject(govern2);
Reply
#3

i tried..doesent work..
Reply
#4

is DestroyObject(govern2); a 0.3x bug??
Reply
#5

Create govern2 globally, with MAX_PLAYERS:
pawn Код:
new govern2[ MAX_PLAYERS ];
then use
pawn Код:
govern2[ playerid ] = CreateObject( ... );
and
pawn Код:
DestroyObject( govern2[ playerid ] );
Reply
#6

did you test cmd?
Reply
#7

Finnalyyy :X il rep you dupa 24 hours )
Reply
#8

For example. X puts siren on.if Y takes Siren off the siren gets bugged /gon!Please help me

Quote:

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;
}

Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)