Jump to content
  • 0

Help pls


ReaxoR

Question

[pawn]

else if(strcmp(x_nr,"color",true) == 0)

        {

            if(PlayerInfo[playerid][pPcarkey] == 999 && PlayerInfo[playerid][pPcarkey2] == 999 && PlayerInfo[playerid][pPcarkey3] == 999)

        {

            SendClientMessage(playerid, COLOR_GREY,"  Nu ai o masina ca sa o vopsesti! ");

            return 1;

        }

        if(GetPlayerMoney(playerid) < 100);

        {

            SendClientMessage(playerid, COLOR_GREY,"  Nu ai destui bani ca sa vopsesti masina!");

            return 1;

        }

        tmp = strtok(cmdtext, idx);

        if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GREY, "USAGE: /v color [ColorOneID] [ColorTwoID]");

return 1;

}

new color1;

color1 = strval(tmp);

if(color1 < 0 && color1 > 126)

{

    SendClientMessage(playerid, COLOR_GREY, "  Color ID gresit!");

    return 1;

}

tmp = strtok(cmdtext, idx);

        if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_WHITE, "USAGE: /v color [ColorOneID] [ColorTwoID]");

return 1;

}

new color2;

color2 = strval(tmp);

if(color2 < 0 && color2 > 126)

{

    SendClientMessage(playerid, COLOR_GREY, "  Color ID gresit!");

    return 1;

}

new vehid;

if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { vehid = PlayerInfo[playerid][pPcarkey]; }

else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { vehid = PlayerInfo[playerid][pPcarkey2]; }

else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { vehid = PlayerInfo[playerid][pPcarkey3]; }

else { return 1; }

        if(IsPlayerInVehicle(playerid, vehid))

        {

        CarInfo[vehid][cColorOne] = color1;

                CarInfo[vehid][cColorTwo] = color2;

                GivePlayerCash(playerid, -20000);

                GameTextForPlayer(playerid, "~w~Factura pentru vopsire~n~~r~-$20000", 5000, 1);

                ChangeVehicleColor(vehid, color1, color2);

                OnPropUpdate();

return 1;

    }[/pawn]

Imi da 1 eroare si un warning si nu inteleg ma puteti ajuta

C:\Users\Radu\Desktop\GTA Game-Romania\gamemodes\PG.pwn(26532) : error 036: empty statement

C:\Users\Radu\Desktop\GTA Game-Romania\gamemodes\PG.pwn(26537) : warning 225: unreachable code

linia 26532

[pawn]if(GetPlayerMoney(playerid) < 100);[/pawn]

linia 26537

[pawn]tmp = strtok(cmdtext, idx);[/pawn]

[MAP]Noul Cartier - http://www.sa-mp.ro/forum/index.php?topic=31520.0

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Buna seara ReaxoR

Dupa o analiza completa a problemei tale am constat ca in linia 26537 este o greseala minora.O rezolvare a problemei este de a inlocuii if(GetPlayerMoney(playerid) < 100); cu urmatorul cod de ma jos :

[pawn]if(GetPlayerMoney(playerid) < 100)[/pawn]

Greseala este ca ai pus ";" la sfarsit.

Sper ca ti-am fost de folos,

[Pawn]

Pentru suport nu ezitati sa ma contactati printr-un mesaj privat sau un mesaj pe Y/M.(Scripting sa:mp/cs,ScripturiWEB,phpbb,mysql,ipb,photoshop,html)

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.