Command Scripting: /v
#5

Quote:
Originally Posted by B-rian
Посмотреть сообщение
Avi, is there a specific place i need to put the code in Pawno? or can I just lay it somewhere?
My friend, that is a filterscript.

Make a new .pwn file - Paste it in, save it as soemthing E.G "Vehsystem", Compile it (F5), then once the AMX is there, drag it over int oyour server - And in your server.cfg, on the 'filsterscripts' add the 'Vehsystem' there, or whatever you called it and re-run your server


Also, respawning cars;
pawn Код:
CMD:respawn(playerid, params[])
{
    new string[128], veh;
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
//     if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on admin duty.");
    if(!strcmp(params, "all", true))
    {
        for(new i=0; i<MAX_VEHICLES; i++)
        {
            if(i != NPCBus)
            {
                new vehs;
                foreach(Player, x)
                {
                    if(GetPlayerVehicleID(x) == i)
                    {
                        vehs = 1;
                    }
                }
                if(!vehs)
                {
                    SetVehicleToRespawn(i);
                }
                vehs = 0;
            }
        }
        format(string, sizeof(string), "AdmCmd: %s has respawned all unused vehicles.", RPN(playerid));
        SendClientMessageToAll(COLOR_LIGHTRED, string);
        return 1;
    }
    if(sscanf(params, "i", veh)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /respawn [vehicleid/all]");
    SetVehicleToRespawn(veh);
    format(string, sizeof(string), "AdmWarn: %s has respawned vehicle ID %d.", RPN(playerid), veh);
    SendAdminMessage(COLOR_DARKRED, 1, string);
    return 1;
}
Usage:
/respawn (in a car will respawn the car you are in)
/respawn [VEHICLEID] (when not in a car, will respawn the specified ID (/dl can be used to get the ID's of cars)
/respawn all = Does as it says on the tin.
Reply


Messages In This Thread
Command Scripting: /v - by B-rian - 18.06.2012, 15:15
Re: Command Scripting: /v - by MarinacMrcina - 18.06.2012, 15:22
Re: Command Scripting: /v - by Avi57 - 18.06.2012, 15:22
Re: Command Scripting: /v - by B-rian - 18.06.2012, 15:25
Re: Command Scripting: /v - by A7X_CEEJAY - 18.06.2012, 15:35
Re: Command Scripting: /v - by Randy More - 18.06.2012, 15:41
Re: Command Scripting: /v - by B-rian - 18.06.2012, 19:04
Re: Command Scripting: /v - by A7X_CEEJAY - 18.06.2012, 19:38
Re: Command Scripting: /v - by B-rian - 18.06.2012, 20:32
Re: Command Scripting: /v - by B-rian - 18.06.2012, 20:34

Forum Jump:


Users browsing this thread: 1 Guest(s)