SA-MP Forums Archive
I need a command that the administrator use to park cars dealerships RPG. - 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: I need a command that the administrator use to park cars dealerships RPG. (/showthread.php?tid=466885)



I need a command that the administrator use to park cars dealerships RPG. - tristtok - 29.09.2013

Could create the command /apark (Command that the administrator uses to park cars the Dealers RPG) for me? I can not create, please.

Command that normal players use to park the car:
This is part of the command /v:


pawn Код:
if(strcmp(tmp, "park", true) == 0)
        {
            if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem um Carro VIP.");
                return true;
            }
            if(PlayerInfo[playerid][pCarKey] != vehid && PlayerInfo[playerid][pCarKey2] != vehid)
            {
                SendClientMessage(playerid, COLOR_GREY, "Esse nгo й seu Carro VIP.");
                return true;
            }
            new Float:x,Float:y,Float:z;
            new Float:a;
            new carid;
            new getcarid;
            new Veiculo;
            if(vehid == PlayerInfo[playerid][pCarKey]) { carid = PlayerInfo[playerid][pCarKey]; Veiculo = PlayerInfo[playerid][pVeiculo]; }
            else if(vehid == PlayerInfo[playerid][pCarKey2]) { carid = PlayerInfo[playerid][pCarKey2]; Veiculo = PlayerInfo[playerid][pVeiculo2]; }
            if(IsPlayerInVehicle(playerid,carid) && CarInfo[Veiculo][cOwned] == 1)
            {
                getcarid = GetPlayerVehicleID(playerid);
                GetPlayerName(playerid, playername, sizeof(playername));
                GetVehiclePos(carid, x, y, z);
                GetVehicleZAngle(carid, a);
                if(getcarid == carid)
                {
                    CarInfo[Veiculo][cLocationx] = x;
                    CarInfo[Veiculo][cLocationy] = y;
                    CarInfo[Veiculo][cLocationz] = z;
                    CarInfo[Veiculo][cAngle] = a;
                    format(string, sizeof(string), "~n~ Veiculo Estacionado Aqui! ~n~");
                    GameTextForPlayer(playerid, "Veiculo Estacionado!~n~Ele vai nascer aqui!.", 10000, 3);
                    DestroyVehicle(carid);
                    new carid2 = CreateVehicle(CarInfo[Veiculo][cModel],CarInfo[Veiculo][cLocationx],CarInfo[Veiculo][cLocationy],CarInfo[Veiculo][cLocationz]+1.0,CarInfo[Veiculo][cAngle],CarInfo[Veiculo][cColorOne],CarInfo[Veiculo][cColorTwo],60000);
                    Controle(playerid, 1);
                    SaveCars();
                    SetVehicleToRespawn(carid2);
                    return true;
                }
                return true;
            }
            return true;
        }



Re: I need a command that the administrator use to park cars dealerships RPG. - tristtok - 29.09.2013

UP..


Re: I need a command that the administrator use to park cars dealerships RPG. - Scrillex - 29.09.2013

It will not be possible.... because Player has the keys of car not administrator.. (Saved in ini folder)