Hmmh, Convert but problem occured
#1

Well ya i was converting one of my scripts to zcmd, as it were dcmd before, but then i came to this code:

pawn Код:
if(IsNumeric(text))
    {
        if(UserStats[playerid][Spawned] == 1 && ActiveMenu[playerid][MedicPricess2] == 1 && (gTeam[playerid] == TEAM_MEDIC || gTeam[playerid] == TEAM_PVTMED)) //
        {
            new medicpricelimitleast,medicpricelimitmax,string[128];
            if(CarriedThrough[playerid] == 1) { medicpricelimitleast = 1000; medicpricelimitmax = 5000; }
            if(CarriedThrough[playerid] == 2) { medicpricelimitleast = 2000; medicpricelimitmax = 5000; }
            if(CarriedThrough[playerid] == 3) { medicpricelimitleast = 2500; medicpricelimitmax = 7000; }

            if(!IsNumeric(text)) { format(string,sizeof(string),"The Medic Service Price Must Be Between $%d - $%d!",medicpricelimitleast,medicpricelimitmax); SendClientMessage(playerid,COLOR_RED,string); return 0; }
            new t2;
            t2 = strval(text);
            if(t2 < medicpricelimitleast || t2 > medicpricelimitmax) { format(string,sizeof(string),"The Medic Service Price Must Be Between $%d - $%d!",medicpricelimitleast,medicpricelimitmax); SendClientMessage(playerid,COLOR_RED,string); return 0; }

            if(CarriedThrough[playerid] == 1) { MedicPrice[playerid][HEAL] = t2; format(string,sizeof(string),"* You Changed Your (Heal) Price, The New Price Is $%d",MedicPrice[playerid][HEAL]); }
            if(CarriedThrough[playerid] == 2) { MedicPrice[playerid][CURE] = t2; format(string,sizeof(string),"* You Changed Your (Cure) Price, The New Price Is $%d",MedicPrice[playerid][CURE]); }
            if(CarriedThrough[playerid] == 3) { MedicPrice[playerid][BOTHHEALCURE] = t2; format(string,sizeof(string),"* You Changed Your (Heal + Cure) Price, The New Price Is $%d",MedicPrice[playerid][BOTHHEALCURE]); }
            SendClientMessage(playerid,COLOR_YAY,string);

            if(!PlayerLogged[playerid]) return 0;

            dcmd_prices(playerid, " ");

            CheckMySQL();
            if(!PlayerLogged[playerid]) return 0;
            new stringer[500];
            format(stringer, sizeof(stringer), "UPDATE users SET HEAL='%d',CURE='%d',BOTHHEALCURE='%d' WHERE Name='%s'",MedicPrice[playerid][HEAL],MedicPrice[playerid][CURE],MedicPrice[playerid][BOTHHEALCURE],UserStats[playerid][Name]);
            mysql_query(stringer);

            HideBox(playerid);
            return 0;
        }
    }
How can i convert the ' dcmd_prices(playerid, " ");' ?
Reply
#2

What this line is about?
Reply
#3

What ya mean?
Reply
#4

What this code its about?i mean what is about STATS?
what fs?i mean
Reply
#5

Actully not a fs :P Gamemode :3 i made it long time ago

nVM, I FIXED IT :d
Reply
#6

just converto to cmd_prices(playerid, ""); and prices must be zcmd too.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)