Jump to content
  • 0

O problema OnVehicleStreamIn


Question

Posted

Am bagat

[color=blue]public[/color] OnVehicleStreamIn(vehicleid, forplayerid)
{
    if(gCarLock[vehicleid] == 1)
    {
        LockCar(vehicleid);
    }
    return 1;
}

si cand intru intr-un vehicul si dupaia ma dau jos din ea si ma duc departe , cand ma intorc e inchisa :(

Ce pot face sa nu se inchida ?

i0418xcttya707ofg.jpg

6 answers to this question

Recommended Posts

Posted
public OnVehicleStreamIn(vehicleid,forplayerid)
{
	if(gCarLock[vehicleid] == 1)
        {
	        LockCar(vehicleid);
        }
	else
	{
	        gCarLock[vehicleid] = 0;
        }
	return 1;
}

Posted

public OnVehicleStreamIn(vehicleid,forplayerid)
{
	if(gCarLock[vehicleid] == 1)
        {
	        LockCar(vehicleid);
        }
	else
	{
	        gCarLock[vehicleid] = 0;
        }
	return 1;
}

Nu merge, tot se inchide .

i0418xcttya707ofg.jpg

  • Administrator
Posted

Incearca

public OnVehicleStreamIn(vehicleid,forplayerid)
{
    if(gCarLock[vehicleid] == 1)
    {
        LockCar(vehicleid);
    }
    else if(gCarLock[vehicleid] == 0)
    {
        UnLockCar(vehicleid);
    }
    return 1;
}

Nu am avut de a face cu callback-ul asta...

logo.png

ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.

Posted

=-" post="43226" timestamp="1287160524"]

Incearca

public OnVehicleStreamIn(vehicleid,forplayerid)
{
    if(gCarLock[vehicleid] == 1)
    {
        LockCar(vehicleid);
    }
    else if(gCarLock[vehicleid] == 0)
    {
        UnLockCar(vehicleid);
    }
    return 1;
}

Nu am avut de a face cu callback-ul asta...

Nu merge nici asa :(

Nush de la ce o fi :((

i0418xcttya707ofg.jpg

Posted

=-" post="43228" timestamp="1287161543"]

public OnVehicleStreamIn(vehicleid,forplayerid)
{
    if(gCarLock[vehicleid] == 1)
    {
        LockCar(vehicleid);
    }
    else if(gCarLock[vehicleid] == 0)
    {
        UnLockCar(vehicleid);
    }
    return 1;
}
forward LockCar(vehicleid)
public LockCar(vehicleid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            SetVehicleParamsForPlayer(vehicleid,i,0,1);
            gCarLock[vehicleid] = 1;
        }
    }
}
forward UnLockCar(vehicleid)
public UnLockCar(vehicleid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
             SetVehicleParamsForPlayer(vehicleid,i,0,0);
            gCarLock[vehicleid] = 0;
        }
    }
}
Nu stiu sigur daca e bine, dar incearca!
Da erori :(
error 025: function heading differs from prototype
error 025: function heading differs from prototype
error 021: symbol already defined: "LockCar"
error 025: function heading differs from prototype
error 025: function heading differs from prototype
error 021: symbol already defined: "UnLockCar"

Cine stie de la ce o fi  ???

i0418xcttya707ofg.jpg

Posted

sterge LockCar si UnLockCar alea vechi si tine-le pe cele de la vyorel.

-Toate tutorialele postate intra aici sau puneti-le direct [url=http://www.sa-mp.ro/forum/index

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.