SA-MP Forums Archive
What I'm doing wrong here ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: What I'm doing wrong here ? (/showthread.php?tid=535503)



What I'm doing wrong here ? - Clad - 04.09.2014

Not fixed, Never mind.


Re: What I'm doing wrong here ? - Jack_Leslie - 04.09.2014

pawn Код:
if (!strcmp("3", tmp, true)) if(Logged[playerid] == 1)
{
    if(GetPlayerecard(playerid) > 3) return SendClientMessage(playerid,c_r,"( ! ) You lack the items required !");
    //Code which gives Silver here works.
    SaveBag(playerid);
    ecardd[playerid] -= 3 // This code doesn't work, It doesn't take 3 ecard from the bag.
    SendClientMessage(playerid,COLOR_GREEN,"( ! ) You have gotten 1 Silver medal !");
    return 1;
}

// you can also use += for addition
// so ecardd[playerid] += 3 would add 3 "ecards"



Re: What I'm doing wrong here ? - Clad - 04.09.2014

----


Re: What I'm doing wrong here ? - VinPure - 04.09.2014

pawn Код:
#define GivePlayerecard(%0,%1) ecardd[%0] += (%1)



Re: What I'm doing wrong here ? - MasonSFW - 04.09.2014

try this

Код:
if (!strcmp("3", tmp, true)) 
    {
    if(Logged[playerid] == 1) return SendClientMessage(playerid, -1,"( ! ) You aren't login !");
    if(GetPlayerecard(playerid) > 3) return SendClientMessage(playerid,c_r,"( ! ) You lack the items required !");
    //Code which gives Silver here works.
    SaveBag(playerid);
    GivePlayerecard(playerid,-3); // This code doesn't work, It doesn't take 3 ecard from the bag.
    SendClientMessage(playerid,COLOR_GREEN,"( ! ) You have gotten 1 Silver medal !");
    return 1;
    }



Re: What I'm doing wrong here ? - Clad - 04.09.2014

----