SA-MP Forums Archive
Car Lock abusing - 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: Car Lock abusing (/showthread.php?tid=147467)



Car Lock abusing - ArTisT - 12.05.2010

Quote:

if(strcmp(cmd, "/vehlock", true) == 0)
{
new keycar = PlayerInfo[playerid][pPcarkey];
if(keycar != 999)
{
new locked[256];
locked = strtok(cmdtext, idx);
if(CarInfo[keycar][cLock] == 1)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
SetVehicleParamsForPlayer(keycar,i,0,0);
}
}
format(string, sizeof(string), "~w~Vehicle~n~~g~Unlocked");
GameTextForPlayer(playerid, string, 4000, 3);
CarInfo[keycar][cLock] = 0;
OnPropUpdate();
return 1;
}
else if(CarInfo[keycar][cLock] == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
SetVehicleParamsForPlayer(keycar,i,0,1);
}
}
format(string, sizeof(string), "~w~Vehicle~n~~r~Locked");
GameTextForPlayer(playerid, string, 4000, 3);
CarInfo[keycar][cLock] = 1;
OnPropUpdate();
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have a vehicle at slot 1");
return 1;
}
}

There aint any problems with locking cars the cmd works fine.. but... theres a bug if you press F then wait 1sec and press F more times u can enter the cars.. anyone has an idea ?


Re: Car Lock abusing - lewisno7 - 12.05.2010

What car system is this, or is it planted into your GM?



Re: Car Lock abusing - ArTisT - 12.05.2010

gamemod nobodys know the bug only 2 persons ^^


Re: Car Lock abusing - smeti - 12.05.2010

https://sampwiki.blast.hk/wiki/OnVehicleStreamIn
https://sampwiki.blast.hk/wiki/SetVehicleParamsForPlayer


Re: Car Lock abusing - ArTisT - 12.05.2010

ty for links

hmm whats wrong i checked the links didnt found anything how it can help me..