Help me with this !
#1

Remove -Fixed.
Reply
#2

PHP Code:
CMD:dicebet(playeridparams[])
{
    new 
string[128], giveplayeridmoney;
    if(
sscanf(params"ud"giveplayeridmoney)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /dicebet [playerid/partofname] [price]");
    if(
GetPVarInt(playerid"GuardTimer") > 0)
    {
        
format(stringsizeof(string), "   You must wait %d seconds before again doing dice bet."GetPVarInt(playerid"GuardTimer"));
        
SendClientMessage(playerid,COLOR_GREY,string);
        return 
1;
    }

    if(
money PlayerInfo[playerid][pCash]) return SendClientMessage(playeridCOLOR_GREY"You don't have that many cash!");

    if(
IsPlayerConnected(giveplayerid))
    {
        if(
giveplayerid != INVALID_PLAYER_ID)
        {
            if(
ProxDetectorS(8.0playeridgiveplayerid))
            {
               
SetPVarInt(playerid"GuardTimer"10); SetTimerEx("OtherTimerEx"1000false"ii"playeridTYPE_GUARDTIMER);
               
format(stringsizeof(string), "* You offered %s a bet for $%d."GetPlayerNameEx(giveplayerid), money);
               
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
               
format(stringsizeof(string), "* %s wants to gamble with you for $%d, type (/accept dicebet) to accept it."GetPlayerNameEx(playerid), money);
               
SendClientMessage(giveplayeridCOLOR_WHITEstring);
               
CoinOffer[giveplayerid] = playerid;
               
CoinPrice[giveplayerid] = money;
               
//format(string, sizeof(string), "* %s has offered the dice bet to %s for %d.",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), money);
               //ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
}
            else
            {
                
SendClientMessage(playeridCOLOR_GREY"That player isn't near you.");
            }
        }
    }
    else
    {
        
SendClientMessage(playeridCOLOR_GRAD1"Invalid player specified.");
    }
    return 
1;

Reply
#3

Can Someone tell me how to define this because i dont know how to script or just give me a code ?



This is after i define CoinOffer

Reply
#4

change
#define CoinOffer
to

PHP Code:
new CoinOffer[MAX_PLAYERS]; 
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)