im looking for briefcase?
#1

I see on some servers RPG there was to buy a BAG it was named /briefcase .. Can anyone give me that FS.
Reply
#2

Well, on most RP servers, you must buy it from the 24-7.
Here is a command, just to place it away, and bring it out.
pawn Код:
if(strcmp(cmd, "/briefcase", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(BCase[playerid] == 0)// Makes sure the briefcase is putaway.
        {
            SetPlayerHoldingObject(playerid, 1210, 6,0.3,0.1,0,0,-90,0); // BriefCase
            SendClientMessage(playerid, COLOR_WHITE, " You have pulled out your briefcase. ");
            BCase[playerid] = 1;
            return 1;
        }
        else if(BCase[playerid] == 1)// Makes sure the briefcase is being used/
        {
            StopPlayerHoldingObject(playerid);
            SendClientMessage(playerid, COLOR_WHITE, " You have put away your briefcase. ");
            BCase[playerid] = 0;
            return 1;
        }
        return 1;
    }
    return 1;//Change to 0 if it's your only command.
}
Here is the command(Does same thing)
but you must purchase one from a 24-7 first.(GF Edit compatible)

If using a dialog, OnDialogResponse
pawn Код:
if(listitem == 14)//This is Number 14(in /buy), it has been bought. Change 14 to fit your script. This is in a Dialog.
{
    GivePlayerMoney(playerid, -50);
    PlayerInfo[playerid][pBCase] = 1;
    SendClientMessage(playerid, COLOR_WHITE, "** You now have a Briefcase, and can use /briefcase");
}
Top of Script.
pawn Код:
new BCase[MAX_PLAYERS];//Defines if you have the briefcase putaway / Being used.
Under, pInfo(If using GF / Edit of GF)
pawn Код:
pBCase,
Under, OnPlayerConnect
pawn Код:
BCase[playerid] = 0;//Sets the player to not have the briefcase out, when connecting.
pawn Код:
if(strcmp(cmd, "/briefcase", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pBCase] == 1)
        {
            if(BCase[playerid] == 0)
            {
                SetPlayerHoldingObject(playerid, 1210, 6,0.3,0.1,0,0,-90,0); // BriefCase
                SendClientMessage(playerid, COLOR_WHITE, " You have pulled out your briefcase. ");
                BCase[playerid] = 1;
                return 1;
            }
            else if(BCase[playerid] == 1)
            {
                 StopPlayerHoldingObject(playerid);
                 SendClientMessage(playerid, COLOR_WHITE, " You have put away your briefcase. ");
                 BCase[playerid] = 0;
                 return 1;
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GRAD2, " You don't own a briefcase !");
            return 1;
        }
        return 1;
    }
    return 1;//Change this to 0 if it is your only command.
}
Hope that helped xD
Reply
#3

Please help me!!

Код:
C:\Documents and Settings\GBLTeam\My Documents\My Received Files\LSLRP\LSLRP\gamemodes\lslrp.pwn(597) : error 021: symbol already defined: "BCase"
C:\Documents and Settings\GBLTeam\My Documents\My Received Files\LSLRP\LSLRP\gamemodes\lslrp.pwn(1719) : error 021: symbol already defined: "pBCase"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Line 597: new BCase[MAX_PLAYERS];//Defines if you have the briefcase putaway / Being used.
Line 1719: pBCase,

What i need to do to fix this??
Reply
#4

The setplayerholdingobject its not working in 0.3c anymore
Reply
#5

The setplayerholdingobject its not working in 0.3c anymore
im not using 0.3c im using 0.3b and i fix it thanks btw.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)