[FilterScript] TPGun
#1

Hi,
Today I release my first FilterScript, It's a really simple FilterScript but usefull in DeathMatch GameModes..
You can easily edit it, if you have any suggestions, post here, I'll make my possible to do them but I'm a new scripter in Pawn.

It's a menu with:
->Weapon menu
->Cars Menu
->Teleport Menu

Just type in game : /menu.

Screens:

http://hpics.li/a27da1d
http://hpics.li/7689a55
http://hpics.li/3986bc4

Links:
SolidFiles : http://solidfiles.com/d/61ab/
PasteBin: http://pastebin.com/FQ99gxzh
Reply
#2

Very nice for your first :P Keep it up
Reply
#3

Thank's
Reply
#4

Where should i put this line:

Код:
if(playerDB[playerid][admin])
so that only admins could use this cmd
Reply
#5

Replace the original script for the command menu by:

pawn Код:
COMMAND:menu(playerid, params[])
    if(IsPlayerConnected(playerid) && IsPlayerAdmin(playerid))
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What do you want?", "Gun Shop \nVehicles Shop \nTeleport Destinations", "Buy", "Cancel");
        return 1;
    }
    else
    {
        SendClientMessage(playerid, COLOR_INFO, "You must be RCON login to use this command!");
        return 1;
    }
So, after this, you will need to be RCON login to use the command.
Reply
#6

but i want that all admins could us it, not only with rcon. Is it possible?
Reply
#7

Make a enum e.x enum Playerinfo {Adminlvl} usw SetPVars and use for example CMD:Hey......If(Playerinfo[Adminlvl]=1 or something else
Reply
#8

Give us your Admin variable...
But then you need to incorporate this script ino your gamemode...
Reply
#9

He just ask about one ,ricardo...But if you want to make one ,its simple ,if not ask wiki.
Reply
#10

Quote:
Originally Posted by soulas85
Посмотреть сообщение
Where should i put this line:

Код:
if(playerDB[playerid][admin])
so that only admins could use this cmd
my server recognizes admin with this.
Reply
#11

Past here an admin command of your gamemode please.
Reply
#12

PHP код:
if(!strcmp("/telvm"cmdtexttrue))
{
    if(
playerDB[playerid][admin] || playerDB[playerid][vip])
    {
        if(
GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            new 
veh GetPlayerVehicleID(playerid);
            
SetVehiclePos(veh, -1994.4752, -83.904235.8087);
            
SetVehicleVirtualWorld(veh0);
            
LinkVehicleToInterior(veh0);
            
SetPlayerInterior(playerid0);
            
SetPlayerVirtualWorld(playerid0);
            
PutPlayerInVehicle(playeridveh0);
        }
        else
        {
            
SetPlayerPos(playerid, -1994.4752, -83.904235.8087);
            
SetPlayerInterior(playerid0);
            
SetPlayerVirtualWorld(playerid0);
        }
    }
    return 
1;

Reply
#13

pawn Код:
COMMAND:menu(playerid, params[])
    if(playerDB[playerid][admin] || playerDB[playerid][vip]) // If player is admin or VIP.
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What do you want?", "Gun Shop \nVehicles Shop \nTeleport Destinations", "Buy", "Cancel");
        return 1;
    }
    else
    {
        SendClientMessage(playerid, COLOR_INFO, "You must be administrator or VIP to use this command!");
        return 1;
    }
That might work.. But, you will need to implement the FS in your gamemode... So if you use the "basic" system command in your gamemode, you will need to replace the command by this:

pawn Код:
if(!strcmp("/menu", cmdtext, true))
{  
    if(playerDB[playerid][admin] || playerDB[playerid][vip]) // If player is admin or VIP.
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What do you want?", "Gun Shop \nVehicles Shop \nTeleport Destinations", "Buy", "Cancel");
    }
    else
    {
        SendClientMessage(playerid, COLOR_INFO, "You must be administrator or VIP to use this command!");
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)