SA-MP Forums Archive
Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem (/showthread.php?tid=342629)



Problem - Dan_Barocu - 14.05.2012

for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsACopCar(newcar))
{
new newcar = GetPlayerVehicleID(i);
AddVehicleComponent(GetPlayerVehicleID, 19311);
return 1;
}
}


Re: Problem - .FuneraL. - 14.05.2012

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if(IsACopCar(newcar))
    {
         new newcar = GetPlayerVehicleID(i);
         AddVehicleComponent(newcar, 19311);
         return 1;
    }
}
Try.


Re: Problem - ViniBorn - 14.05.2012

Quote:
Originally Posted by .FuneraL.
Посмотреть сообщение
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if(IsACopCar(newcar))
    {
         new newcar = GetPlayerVehicleID(i);
         AddVehicleComponent(newcar, 19311);
         return 1;
    }
}
Try.
Only work for one player.


pawn Код:
for(new i; i < MAX_PLAYERS; i++)
    if(IsACopCar(GetPlayerVehicleID(i)))
        AddVehicleComponent(GetPlayerVehicleID(i), 19311);



Re: Problem - Faisal_khan - 14.05.2012

Quote:
Originally Posted by Dan_Barocu
Посмотреть сообщение
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsACopCar(newcar))
{
new newcar = GetPlayerVehicleID(i);
AddVehicleComponent(GetPlayerVehicleID, 19311);
return 1;
}
}
wats the problem?


Re: Problem - Dan_Barocu - 14.05.2012

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
Only work for one player.


pawn Код:
new newcar;
for(new i = 0; i < MAX_PLAYERS; i++)
{
    newcar = GetPlayerVehicleID(i);
    if(IsACopCar(newcar))
        AddVehicleComponent(newcar, 19311);
}
but will this put above sultan the taxi sign?(taxi04) ?

EDIT:i want to put above my sultan taxi sign find (taxi04) and youle know..


Re: Problem - .FuneraL. - 14.05.2012

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
Only work for one player.


pawn Код:
new newcar;
for(new i = 0; i < MAX_PLAYERS; i++)
{
    newcar = GetPlayerVehicleID(i);
    if(IsACopCar(newcar))
        AddVehicleComponent(newcar, 19311);
}
Thanks Vini, had forgotten to put the new back Newcar.


Re: Problem - ViniBorn - 14.05.2012

IsACopCar works by model or by ID ?


Re: Problem - Dan_Barocu - 14.05.2012

model but this isnt what i want..i want to put at sultan attachobject to vehicle i think it is.


Re: Problem - ViniBorn - 14.05.2012

pawn Код:
for(new i, j = GetMaxPlayers(); i != j; i++)
    if(GetVehicleModel(GetPlayerVehicleID(i)) == 560)
        AddVehicleComponent(GetPlayerVehicleID(i), 19311);



Re: Problem - Dan_Barocu - 14.05.2012

will this attach (taxi04) to sultan?