Jump to content
  • 0

Problema /gift


AlexRares19

Question

Problema intalnita (descriere): Jucatorii nu primesc RP-ul cand dau /gift
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu):

if(strcmp(cmd, "/gift", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
  if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1635.7312,-2262.6238,13.4889)) return SendClientMessage(playerid, COLOR_WHITE, "You are not near gift box.");
if(PlayerInfo[playerid][pGift] > 0) return format(gString,sizeof(gString),"Please wait %d hours.",PlayerInfo[playerid][pGift]) ,SendClientMessage(playerid, COLOR_WHITE, gString);
switch(random(3))
{
    case 0:
    {
        new rp = random(3) + 1;
        format(gString,sizeof(gString),"* You received %d respect points",rp);
        SendClientMessage(playerid, COLOR_TKF_BLEU, gString);
PlayerInfo[playerid][pConnectTime] += rp;
Update(playerid, pConnectTimex);
PlayerInfo[playerid][pGift] = 4;
Update(playerid, pGiftx);
    }
    case 1:
    {
        new cash = 50000 + random(100000);
        format(gString,sizeof(gString),"* You received $%s.",FormatNumber(cash));
        SendClientMessage(playerid, COLOR_TKF_BLEU, gString);
GivePlayerCash(playerid, cash);
PlayerInfo[playerid][pGift] = 4;
Update(playerid, pGiftx);
    }
}
    }
return 1;
}


Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Da

Multumesc pentru ajutor!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

new rp = random(3);

new respect = rp + 1;

 

Incearca asa, iar in loc de rp, pui respect la liniile : 

format(gString,sizeof(gString),"* You received %d respect points",rp);
        SendClientMessage(playerid, COLOR_TKF_BLEU, gString);
PlayerInfo[playerid][pConnectTime] += rp;
Update(playerid, pConnectTimex);
PlayerInfo[playerid][pGift] = 4;
Update(playerid, pGiftx);

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.