Player pulls vehicle's handle - 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: Player pulls vehicle's handle (
/showthread.php?tid=393372)
Player pulls vehicle's handle -
Moron - 18.11.2012
Hey, I've got a vehicle system which ejects players from vehicles if they do not have permission to use them. I was wondering how to changed it that when the player presses ENTER he comes by the vehicle door and pulls the door handle, but the door doesn't open instead?
Re: Player pulls vehicle's handle -
RanSEE - 18.11.2012
pawn Код:
LockCarsForPlayer(playerid)
{
// printf("[debug] player: %d classid = %d team = %s",playerid, classid, gTeamInfo[gPlayer[playerid][Team]][TeamName]);
for (i=1;i<sizeof(gCars);i++) {
if(gCars[i][CarTeam] == gPlayer[playerid][Team]) {
//Lock Cars from same team
printf("[debug] locking car %d for player %d", i, playerid);
SetVehicleParamsForPlayer(i,playerid,1,1);
}
else {
//Unlock Cars from other team
printf("[debug] unlocking car %d for player %d", i, playerid);
SetVehicleParamsForPlayer(i,playerid,1,0);
}
}
}
Something like? ..