PLAYER_STATE_DRIVER help?
#1

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);
            }
        }
    }
Reply
#2

OnPlayerKetStateChange ?
pawn Код:
if(newkeys ==  ? && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
Reply
#3

Why did you put
Код:
 ?
Reply
#4

Replace for the chosen key
Reply
#5

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
Replace for the chosen key
What key should i have there? your option
Reply
#6

I don't quite understand.
This code is in OnPlayerKeyStateChange?

What will be his function?
Reply
#7

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
I don't quite understand.
This code is in OnPlayerKeyStateChange?

What will be his function?
Yes is OnPlayerKeyStateChange.
Reply
#8

pawn Код:
if(newkeys ==  KEY_YES && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //Press 'Y'
Reply
#9

List of all keys:
https://sampwiki.blast.hk/wiki/GetPlayerKeys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)