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=346990)
Help? -
N0FeaR - 30.05.2012
When i enter the car is wont come up Vehicle borrowed by, anyone see whats the problem?
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: Help? -
Vince - 30.05.2012
pawn Код:
if(newkeys == PLAYER_STATE_DRIVER)
What callback is this in?
Re: Help? -
BrandyPenguin - 30.05.2012
if(newkeys == PLAYER_STATE_DRIVER) should be if(newstate == PLAYER_STATE_DRIVER). And it should be under OnPlayerStateChange