SA-MP Forums Archive
Help please Big 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: Help please Big Problem (/showthread.php?tid=353040)



Help please Big Problem - Dan_Barocu - 22.06.2012

i would really would liek to fix this problem please help!!

PHP код:
new string[56];
     new 
newcar GetPlayerVehicleID(playerid);
    if(
IsAnOwnableCar(newcar) && CarInfo[newcar][cOwned] !=1)
    {
        
format(string,sizeof(string),"Vehicle registered to %s",CarInfo[newcar][cOwner]);
        
SendClientMessage(playeridCOLOR_WHITEstring);
    } 



Re: Help please Big Problem - TyThaBomb - 22.06.2012

In that script are you saying if it's NOT owned? That's what it seems. Checking if it's ownable and if the car owned doesn't equal 1, usually meaning the opposite.


Re: Help please Big Problem - Dan_Barocu - 22.06.2012

no work i tried with 0 too no work ((


Re: Help please Big Problem - TyThaBomb - 22.06.2012

And what exactly is the problem?


Re: Help please Big Problem - Dan_Barocu - 22.06.2012

i cant see the onplayerentervehicle the message only to owned cars..


Re: Help please Big Problem - ViniBorn - 22.06.2012

GetPlayerVehicleID(playerid) don't work in OnPlayerEnterVehicle, use OnPlayerStateChange !


Re: Help please Big Problem - TyThaBomb - 22.06.2012

Are you saving the CarInfo[newcar][cOwner] to a name? As in GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "%s", pName) and then setting CarInfo[newcar][cOwner] = string;


Re: Help please Big Problem - Dan_Barocu - 22.06.2012

it is onplayerstatechange i want at onplayerentervehicle


Re: Help please Big Problem - Dan_Barocu - 22.06.2012

can some one figur how to do it??


Re: Help please Big Problem - TyThaBomb - 22.06.2012

Looks like it'll have to be OnPlayerStateChange. Basically, if they become PLAYER_STATE_DRIVER, do your normal check to see if the car's owned, and it should work just like that.