PLAYER_STATE_DRIVER 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: PLAYER_STATE_DRIVER help? (
/showthread.php?tid=346897)
PLAYER_STATE_DRIVER help? -
N0FeaR - 30.05.2012
I want so is says Vehicle borrowed by once but when i press w in a car spamming Vehicle borrowed by
pawn Код:
if(newkeys && PLAYER_STATE_DRIVER)
{
new string[128];
new newcar = GetPlayerVehicleID(playerid);
if(IsACopCar(newcar))
{
if(PlayerInfo[playerid][pFaction] != 1)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY,"You don't have keys to this vehicle.");
TogglePlayerControllable(playerid,true);
}
else if(CopInfo[newcar][Created] == 1)
{
format(string,128,"[INFO]: Vehicle borrowed by %s",CopInfo[newcar][Owner]);
SendClientMessage(playerid, 0x8080FF96, string);
}
}
}
Re: PLAYER_STATE_DRIVER help? -
ViniBorn - 30.05.2012
OnPlayerKetStateChange ?
pawn Код:
if(newkeys == ? && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
Re: PLAYER_STATE_DRIVER help? -
N0FeaR - 30.05.2012
Why did you put
Re: PLAYER_STATE_DRIVER help? -
ViniBorn - 30.05.2012
Replace for the chosen key
Re: PLAYER_STATE_DRIVER help? -
N0FeaR - 30.05.2012
Quote:
Originally Posted by Viniborn
Replace for the chosen key
|
What key should i have there? your option
Re: PLAYER_STATE_DRIVER help? -
ViniBorn - 30.05.2012
I don't quite understand.
This code is in OnPlayerKeyStateChange?
What will be his function?
Re: PLAYER_STATE_DRIVER help? -
N0FeaR - 30.05.2012
Quote:
Originally Posted by Viniborn
I don't quite understand.
This code is in OnPlayerKeyStateChange?
What will be his function?
|
Yes is OnPlayerKeyStateChange.
Re: PLAYER_STATE_DRIVER help? -
ViniBorn - 30.05.2012
pawn Код:
if(newkeys == KEY_YES && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //Press 'Y'
Re: PLAYER_STATE_DRIVER help? -
CidadeNovaRP - 30.05.2012
List of all keys:
https://sampwiki.blast.hk/wiki/GetPlayerKeys