weapons
#1

I want to add only that they can drive by with m4 and mp5, how?

thnx

pawn Код:
if(newstate == PLAYER_STATE_PASSENGER)
    {
        fVehSpeed[playerid] = 0;
        new vehicleid = GetPlayerVehicleID(playerid);
        gLastCar[playerid] = vehicleid;

        /*if(PlayerInfo[playerid][pGuns][4] > 0)    SetPlayerArmedWeapon(playerid,PlayerInfo[playerid][pGuns][4]);
        else SetPlayerArmedWeapon(playerid,0);*/

       


        if(GetPVarInt(playerid, "ToBeEjected") >= 1)
        {
            SetPVarInt(playerid, "ToBeEjected", 0);
            RemovePlayerFromVehicle(playerid);
            new Float:X, Float:Y, Float:Z;
            GetPlayerPos(playerid, X, Y, Z);
            SetPlayerPos(playerid, X, Y, Z+2);

            if(GetPVarInt(playerid, "Injured") == 1)
            {
                Streamer_UpdateEx(playerid, GetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"));
                SetPlayerPos(playerid, GetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"));
                SetPlayerVirtualWorld(playerid, GetPVarInt(playerid,"MedicVW"));
                SetPlayerInterior(playerid, GetPVarInt(playerid,"MedicInt"));
                ClearAnimations(playerid);
                ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4.0, 0, 1, 1, 1, 0, 1);
            }
        }

        if(VehicleRadioStation[GetPlayerVehicleID(playerid)] != 0)
        {
            new getradio = VehicleRadioStation[GetPlayerVehicleID(playerid)]-1;
            PlayAudioStreamForPlayer(playerid, VehicleRadioListing[getradio][radiourl]);
        }

        foreach(Player, i)
        {
            if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == 2 && TransportDuty[i] > 0)
            {
                if(GetPlayerCash(playerid) < TransportValue[i])
                {
                    new string[28];
                    format(string, sizeof(string), "* You need $%d to enter.", TransportValue[i]);
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                    RemovePlayerFromVehicle(playerid);
                    new Float:X, Float:Y, Float:Z;
                    GetPlayerPos(playerid, X, Y, Z);
                    SetPlayerPos(playerid, X, Y, Z+2);
                    TogglePlayerControllable(playerid, 1);
                }
                else
                {
                    new string[38];
                    if(TransportDuty[i] == 1)
                    {
                        format(string, sizeof(string), "* You paid $%d to the Taxi Driver.", TransportValue[i]);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                        if(pMask[playerid] == 1)
                        {
                            format(string, sizeof(string), "* An Stranger has entered your taxi.");
                        }
                        else
                        {
                            format(string, sizeof(string), "* Passenger %s has entered your taxi.", GetPlayerNameEx(playerid));
                        }
                        SendClientMessage(i, COLOR_LIGHTBLUE, string);
                        TransportTime[i] = 1;
                        TransportTime[playerid] = 1;
                        TransportCost[playerid] = TransportValue[i];
                        TransportCost[i] = TransportValue[i];
                        TransportDriver[playerid] = i;
                    }
                    else if(TransportDuty[i] == 2)
                    {
                        format(string, sizeof(string), "* You paid $%d to the Taxi Driver.", TransportValue[i]);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                        if(pMask[playerid] == 1)
                        {
                            format(string, sizeof(string), "* An Stranger has entered your taxi.");
                        }
                        else
                        {
                            format(string, sizeof(string), "* Passenger %s has entered your taxi.", GetPlayerNameEx(playerid));
                        }
                        SendClientMessage(i, COLOR_LIGHTBLUE, string);
                    }
                    GivePlayerCash(playerid, - TransportValue[i]);
                    TransportMoney[i] += TransportValue[i];
                }
            }
        }
    }
Reply
#2

I dont think so you can drive by with M4, only with weapons mp5, tec9, uzi can be used to drive by, it comes default by san andreas, so i dont think so you should code to drive by with mp5.
Reply
#3

Quote:
Originally Posted by Imperor
Посмотреть сообщение
I dont think so you can drive by with M4, only with weapons mp5, tec9, uzi can be used to drive by, it comes default by san andreas, so i dont think so you should code to drive by with mp5.
You can press Horn key while as a passenger to driveby with M4. It's possible in SA-MP.
Reply
#4

If i am not wrong he doesnt mean that?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)