Jump to content
  • 0

ajutor urgent plsss


duplex

Question

C:\Documents and Settings\Rares\Desktop\Duplex Gm\gamemodes\hg.pwn(5799) : error 017: undefined symbol "vehicle"

C:\Documents and Settings\Rares\Desktop\Duplex Gm\gamemodes\hg.pwn(5800) : error 017: undefined symbol "vehicle"

C:\Documents and Settings\Rares\Desktop\Duplex Gm\gamemodes\hg.pwn(7816) : warning 204: symbol is assigned a value that is never used: "carkey2"

C:\Documents and Settings\Rares\Desktop\Duplex Gm\gamemodes\hg.pwn(7815) : warning 204: symbol is assigned a value that is never used: "carkey"

C:\Documents and Settings\Rares\Desktop\Duplex Gm\gamemodes\hg.pwn(11928) : warning 219: local variable "string" shadows a variable at a preceding level

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

2 Errors.

[pawn]        if(IsAnOwnableCar(newcar))

{

    if(CarInfo[newcar][cOwned]==0)

    {

        TogglePlayerControllable(playerid, 0);

        SendClientMessage(playerid, COLOR_YELLOW,"___________________________");

        format(string,sizeof(string),"Vehicle Name: %s",CarInfo[newcar][cDescription]);

        SendClientMessage(playerid, COLOR_YELLOW, string);

        format(string,sizeof(string),"Price: %d",CarInfo[newcar][cValue]);

        SendClientMessage(playerid, COLOR_YELLOW, string);

        format(string,sizeof(string),"Owner: %s",CarInfo[newcar][cOwner]);

        SendClientMessage(playerid, COLOR_YELLOW, string);

        SendClientMessage(playerid, COLOR_LIGHTRED,"Type /v buy to buy this car");

        SendClientMessage(playerid, COLOR_YELLOW,"___________________________");

    }

    if(CarInfo[newcar][cOwned]==1)

    {

        format(string,sizeof(string),"Masina Inregistrata pe numele lui: %s",CarInfo[newcar][cOwner]);

SendClientMessage(playerid, COLOR_BUS, string);

/*if(keycar != vehicle)

{

    RemovePlayerFromVehicle(playerid);

    SendClientMessage(playerid, COLOR_GREY, "You don't have a key of this vehicle");

}*/

if(PlayerInfo[playerid][pPcarkey1] == vehicle) { }

else if(PlayerInfo[playerid][pPcarkey2] == vehicle) { }

else

{

if(PlayerInfo[playerid][pAdmin] >= 5 || PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)

{

    SendClientMessage(playerid, COLOR_GREY, "You can drive this car");

}

                    else

    {

    RemovePlayerFromVehicle(playerid);

    SendClientMessage(playerid, COLOR_GREY, "You don't have a key of this vehicle");

}

}

    }

} si linia este if(PlayerInfo[playerid][pPcarkey1] == vehicle) { } [/pawn]

si pentru warning 204: symbol is assigned a value that is never used: "carkey2" si "carkey"

liniile sunt

new carkey = PlayerInfo[targetid][pPcarkey1];

new carkey2 = PlayerInfo[targetid][pPcarkey2];

si pentru warning 219: local variable "string" shadows a variable at a preceding level

este o comanda if(strcmp(cmdtext,"/arme",true) == 0)

{

        if (!PlayerToPoint(2, playerid,296.4013,-80.7277,1001.5156))

{

            SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Nu esti in Magazinul de Arme !");

            return 1;

    }

new string[390];

    format(string, 390, "{FFFFFF}AK-47 {FF9900}- {FF0000}12000{33AA33}$\n\

{FFFFFF}Sniper {FF9900}- {FF0000}5000{33AA33}$\n\

{FFFFFF}Tec9 {FF9900}- {FF0000}5900{33AA33}$\n\

{FFFFFF}9mm {FF9900}- {FF0000}3000{33AA33}$\n\

{FFFFFF}Silenced 9mm {FF9900}- {FF0000}5600{33AA33}$\n\

{FFFFFF}M4 {FF9900}- {FF0000}14000{33AA33}$\n\

{FFFFFF}SMG (MP5) {FF9900}- {FF0000}10000{33AA33}$\n\

{FFFFFF}Health + Armour {FF9900}- {FF0000}2500{33AA33}$", 390);

ShowPlayerDialog(playerid,DIALOG_ARME,DIALOG_STYLE_LIST,"{FFFFFF}Meniu H2G Arme: {000000}", string, "Buy", "Cancel");

return 1;

}

si linia este new string[390];

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

pt prima:

new vehicle = GetPlayerVehicleID(playerid);
a doua:
if(strcmp(cmdtext,"/arme",true) == 0)
{
   if(!PlayerToPoint(2, playerid,296.4013,-80.7277,1001.5156))
   {
   SendClientMessage(playerid, COLOR_GREY,"{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Nu esti in Magazinul de Arme !");
   }
   else
   {
   new string[1280];
   strcat(string,"{FFFFFF}AK-47 {FF9900}- {FF0000}12000{33AA33}$\n");
   strcat(string,"{FFFFFF}Sniper {FF9900}- {FF0000}5000{33AA33}$\n");
   strcat(string,"{FFFFFF}Tec9 {FF9900}- {FF0000}5900{33AA33}$\n");
   strcat(string,"{FFFFFF}9mm {FF9900}- {FF0000}3000{33AA33}$\n");
   strcat(string,"{FFFFFF}Silenced 9mm {FF9900}- {FF0000}5600{33AA33}$\n");
   strcat(string,"{FFFFFF}M4 {FF9900}- {FF0000}14000{33AA33}$\n");
   strcat(string,"{FFFFFF}SMG (MP5) {FF9900}- {FF0000}10000{33AA33}$\n");
   strcat(string,"{FFFFFF}Health + Armour {FF9900}- {FF0000}2500{33AA33}$\n");
   ShowPlayerDialog(playerid,DIALOG_ARME,DIALOG_STYLE_LIST,"{FFFFFF}Meniu H2G Arme: {000000}", string, "Buy", "Cancel");
   }
   return 1;
}
      new carkey = PlayerInfo[targetid][pPcarkey1];
      new carkey2 = PlayerInfo[targetid][pPcarkey2];

si astea stergele deoarece nu folosesti niciodata carkey/carkey2 in loc de PlayerInfo[targetid][pPcarkey1]/PlayerInfo[targetid][pPcarkey2]

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.