SA-MP Forums Archive
pCarKey help please - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: pCarKey help please (/showthread.php?tid=172277)



pCarKey help please - andruz99 - 29.08.2010

for(new i = 0; i < sizeof(CarInfo); i++)
{
new newcar = GetPlayerVehicleID(playerid);
new keycar = PlayerInfo[playerid][pAutoVoti];
new string[256];
if(newcar == CarInfo[i][ownedvehicle])
{
if(CarInfo[i][cOwned]==0)
{
TogglePlayerControllable(playerid, 0);
CarOffered[playerid]=1;
format(string,sizeof(string),"Sхiduk[%s] Hind[%d] ",CarInfo[i][cDescription],CarInfo[i][cValue]);
SendClientMessage(playerid,ROHELINELIME,"[Autopood]");
SendClientMessage(playerid,VALGE,string);
SendClientMessage(playerid,VALGE,"Ostmiseks: /ostaauto");
SendClientMessage(playerid,VALGE,"Vдljumiseks: /sхiduk vдlju");
SendClientMessage(playerid,ROHELINELIME,"[--------]");
}
if(CarInfo[i][cOwned]==1)
{
format(string,sizeof(string),"Sхiduki omanik: %s",CarInfo[i][cOwner]);
SendClientMessage(playerid,SININE,string);
}
}
}
return 1;
}


i want that other people cant drive with my car
anybody help?


Re: pCarKey help please - LarzI - 29.08.2010

SetVehicleParamsForPlayer


Re: pCarKey help please - andruz99 - 29.08.2010

vehicleparam is crap i mean like


SendClientMessage(playerid,GRAY,"You dont have keys of this vehicle");
RemovePlayerFromVehicle(playerid);


but i tried but sometime it kicks me out even if i have pCarKey etc..


Re: pCarKey help please - !Pumpkin - 29.08.2010

Check La-Rp Gamemode , theres lot of useful functions made by Ellis.


Re: pCarKey help please - andruz99 - 29.08.2010

iv looked but everything i tried there didnt work or worked wrongly for me


Re: pCarKey help please - !Pumpkin - 29.08.2010

Oota ma proovin korra ise midagi sulle teha.


Re: pCarKey help please - Paladin - 29.08.2010

Hi

What I did to Lethotas RP was use SetPlayerPos to remove from vehicle, just like a few centimeters away from the car, that way they can't get...

I can show you a sample if you would like as RemovePlayerFromVehicle isn't the best idea for the OnEnter Callback..

Regards
Matthew