SA-MP Forums Archive
[Pedido] Cmd de mudar interior bizz - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Cmd de mudar interior bizz (/showthread.php?tid=391057)



Cmd de mudar interior bizz - Freak@ - 09.11.2012

Queria pedir ajuda de voces pra faser um CMD de mudar interior das empresas ingame que seria /mudarint meu gm eo gf.


Esse cmd e de ir nas empresas ja dentro do interior para servir de base.
pawn Код:
enum bInfo{
    bOwned,
    bOwner[64],
    bMessage[128],
    bExtortion[MAX_PLAYER_NAME],
    Float:bEntranceX,
    Float:bEntranceY,
    Float:bEntranceZ,
    Float:bExitX,
    Float:bExitY,
    Float:bExitZ,
    bLevelNeeded,
    bBuyPrice,
    bEntranceCost,
    bTill,
    bLocked,
    bInterior,
};
enum bInfo
{
    bOwned,
    bOwner[64],
    bMessage[128],
    bExtortion[MAX_PLAYER_NAME],
    Float:bEntranceX,
    Float:bEntranceY,
    Float:bEntranceZ,
    Float:bExitX,
    Float:bExitY,
    Float:bExitZ,
    bLevelNeeded,
    bBuyPrice,
    bEntranceCost,
    bTill,
    bLocked,
    bInterior,
};
    if(strcmp(cmd, "/biz", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] >= 6)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "USE: /biz [empresa]");
                    return 1;
                }
                new Housenum = strval(tmp);
                SetPlayerInterior(playerid,BizzInfo[Housenum][bInterior]);
                SetPlayerPos(playerid,BizzInfo[Housenum][bExitX],BizzInfo[Housenum][bExitY],BizzInfo[Housenum][bExitZ]);
                GameTextForPlayer(playerid, "~w~Teleportado", 5000, 1);
                PlayerInfo[playerid][pInt] = BizzInfo[Housenum][bInterior];
                PlayerInfo[playerid][pLocal] = Housenum+99;
            }
        }
        return 1;
    }



Re: Cmd de mudar interior bizz - Freak@ - 09.11.2012

alguem me ajuda ae pfv.


Re: Cmd de mudar interior bizz - mau.tito - 09.11.2012

Nгo sei se esta correto, nгo sei fazer em strcmp, porisso fiz em zcmd.

pawn Код:
#include zcmd
#include sscanf2

COMMAND:mudarint(playerid, params[])
{
   new IDEmp, IDInt;
   if(playerInfo[playerid][pAdmin] >= 1)
      return SendClientMessage(playerid, -1,"[x] Vocк nгo й um ADM!");

   if(sscanf(params,"ii", IDEmp, IDInt))
      return SendClientMessage(playerid, -1,"[x] CMD : [Id Empresa] [Id Interior]");
     
   BizzInfo[IDEmp][bInterior] = IDInt;
   return true;
}



Re: Cmd de mudar interior bizz - Freak@ - 09.11.2012

Quote:
Originally Posted by mau.tito
Посмотреть сообщение
Nгo sei se esta correto, nгo sei fazer em strcmp, porisso fiz em zcmd.

pawn Код:
#include zcmd
#include sscanf2

COMMAND:mudarint(playerid, params[])
{
   new IDEmp, IDInt;
   if(playerInfo[playerid][pAdmin] >= 1)
      return SendClientMessage(playerid, -1,"[x] Vocк nгo й um ADM!");

   if(sscanf(params,"ii", IDEmp, IDInt))
      return SendClientMessage(playerid, -1,"[x] CMD : [Id Empresa] [Id Interior]");
     
   BizzInfo[IDEmp][bInterior] = IDInt;
   return true;
}
Deu certo obrigado mas uma vez.