SA-MP Forums Archive
HELP !!! - 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 !!! (/showthread.php?tid=352714)



HELP !!! - 3RoR - 20.06.2012

///../


Re: HELP !!! - Kindred - 20.06.2012

Not quite sure, but remove the floats, GetPlayerPos, and SetPlayerPos.

Then just place ClearAnimations(playerid); under GameTextForPlayer. Pretty sure using ClearAnimations prevents you from getting into the vehicle. Plus, people with hacks (won't name them) might be able to prevent the SetPlayerPos.


Re: HELP !!! - 3RoR - 20.06.2012

thank's about that but how to set when a car is locked only the LSPDS(ID 1) can only Enter the car ?
this script isn't working.


Re: HELP !!! - Kindred - 20.06.2012

What is the LSPD variable, or the variable value?

Is LSPD value 1 of PlayerInfo[playerid][pMember]?

If it is, it should work.


Re: HELP !!! - 3RoR - 20.06.2012

yes it is!


Re: HELP !!! - Blunt - 20.06.2012

Код:
if(PlayerInfo[playerid][pMember] != 1)
{
       ApplyAnimationEx(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0);
       SetVehicleParamsForPlayer(vehicleid,playerid,0,1);
       new Float:cx, Float:cy, Float:cz;
       GetPlayerPos(playerid, cx, cy, cz);
       SetPlayerPos(playerid, cx,  cy, cz);
       SendClientMessage(playerid,COLOR_GREY,"This vehicle is reserved for this Member 1 only");
       ApplyAnimationEx(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0);
}



Re: HELP !!! - 3RoR - 20.06.2012

Quote:
Originally Posted by Blunt
Посмотреть сообщение
Код:
if(PlayerInfo[playerid][pMember] != 1)
{
       ApplyAnimationEx(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0);
       SetVehicleParamsForPlayer(vehicleid,playerid,0,1);
       new Float:cx, Float:cy, Float:cz;
       GetPlayerPos(playerid, cx, cy, cz);
       SetPlayerPos(playerid, cx,  cy, cz);
       SendClientMessage(playerid,COLOR_GREY,"This vehicle is reserved for this Member 1 only");
       ApplyAnimationEx(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0);
}
Isn't working this y tried...


Re: HELP !!! - Mimic - 20.06.2012

Try using the following:
pawn Код:
if(GetVehicleModel(vehicleid) == 596 && PlayerInfo[playerid][pMember] != 1)
SendClientMessage(playerid, COLOR_GREY, "You aren't allowed to enter this vehicle!");
and then

pawn Код:
RemovePlayerFromVehicle(playerid);
This way, instead of not letting them enter the vehicle - they will enter the vehicle but will automatically be ejected out. A possible solution I guess?