[Ajuda] Alguem ajuda aqui!!! por favor :D
#6

Quote:
Originally Posted by DraKoN
Tenta!
pawn Код:
//Comnado /roubar para Brasil Virtual Life

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" FS feito por Brasil Virtual Life"    );
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else

main()
{
print("\n----------------------------------");
print(" FS feito por Brasil Virtual Life  ");
print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}

public OnGameModeExit()
{
return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}

public OnPlayerConnect(playerid)
{
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
return 1;
}

public OnPlayerSpawn(playerid)
{
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}

public OnVehicleSpawn(vehicleid)
{
return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}

public OnPlayerText(playerid, text[])
{
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
new playergrana;
new string[256];
new giveplayer[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
new cmd[256];
new tmp[256];
new giveplayerid, moneys, idx;
new animid;

if(strcmp(cmd,"/Roubar",true)==0)
{
if(UsouComando[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "Vocк jб usou esse comando uma vez, espere mais 5 minutos!");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USE: /roubar [id] [Quantia]");
return 1;
}
//giveplayerid = strval(tmp);
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USE: /roubar [id] [Quantia]");
return 1;
}
new money = strval(tmp);
if(money < 1 || money > 5000) { SendClientMessage(playerid, COLOR_GREY, "  Preзo Nao Menor Que $1 ou Maior que $5000!"); return 1; }
if (IsPlayerConnected(giveplayerid))
{

  if(giveplayerid != INVALID_PLAYER_ID)
  {
   if (ProxDetectorS(5.0, playerid, giveplayerid))
 {
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
 GetPlayerName(playerid, sendername, sizeof(sendername));
   format(string, sizeof(string), "* Voce roubou de %s $%d.", giveplayer, money);
 SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
 format(string, sizeof(string), "* %s te Robou $%d Corra e Chame a Policia.", sendername, money);
 SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
              format(string, sizeof(string), "*%s acaba de roubar %s!", sendername,giveplayer);
       ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
       GivePlayerMoneyEx(playerid, money);
 GivePlayerMoneyEx(giveplayerid, -money);
       UsouComando[playerid] = 1;
SetTimerEx("UsarNovamente",300000,0,"d",playerid);

 }
  else
  {
      SendClientMessage(playerid, COLOR_GREY, "Esse jogador nгo perto de vocк!");
  }
}
     }
else
{
  SendClientMessage(playerid, COLOR_GREY, "  Invalido ID/Name!");
  return 1;
}
 
return 1;
}
Blzdark e quem ajudou mas eu queria bloquiado para umas gangs
Pode fazer com ele bloqueado por favor

Quote:
Originally Posted by russooooo
Isso й por causa disto:

pawn Код:
if(PlayerInfo[playerid][pMembro] == 4 || PlayerInfo[playerid][pLider] == 4 ||PlayerInfo[playerid][pMembro] == 5 || PlayerInfo[playerid][pLider] == 5||PlayerInfo[playerid][pMembro] == 12 || PlayerInfo[playerid][pLider] == 12||PlayerInfo[playerid][pMembro] == 13 || PlayerInfo[playerid][pLider] == 13)
Nгo tens o PlayerInfo definido. Usas algum enum? Tipo:

pawn Код:
enum pInfo
{
bla bla
bla bla
};
Se sim apуs esse enum vai ter algo tipo:

pawn Код:
new PlayerData[MAX_PLAYERS][pInfo];
Depois onde diz 'PlayerData' o teu serб diferente й sу copiares o que lб tens e substituir por 'PlayerInfo'.


Edit: O teu tem liders e membros sу agora que vi, deve ser algo assim parecido tambйm.
pawn Код:
enum pCooking
{
    pCook1[20],
    pCook2[20],
    pCook3[20],
    pCook4[20],
    pCook5[20],
    pCWeight1,
    pCWeight2,
    pCWeight3,
    pCWeight4,
    pCWeight5,
    pCookID1,
    pCookID2,
    pCookID3,
    pCookID4,
    pCookID5,
};
enum pGroceries
{
    pChickens,
    pChicken,
    pHamburgers,
    pHamburger,
    pPizzas,
    pPizza,
};
enum pSpec
{
    Float:Coords[3],
    Float:sPx,
    Float:sPy,
    Float:sPz,
    sPint,
    sLocal,
    sCam,
};
enum eCars
{
    model_id,
    Float:pos_x,
    Float:pos_y,
    Float:pos_z,
    Float:z_angle,
};
enum pInfo
{
    pSenha[128],
    pNivel,
    pAdmin,
    pVIP,
    gPupgrade,
    pConnectTime,
    pReg,
    pSexo,
    pFamily,
    pAge,
    pOrigem,
    pCK,
    pMuted,
    pExp,
    pCash,
    pConta,
    pCrimes,
    pKills,
    pDeaths,
    pArrested,
    pWantedDeaths,
    pPhoneBook,
    pLottoNr,
    pFishes,
    pBiggestFish,
    pEmprego,
    pPayCheck,
    pHeadValue,
    pJailed,
    pJailTime,
    pMats,
    pDrogas,
    pLider,
    pMembro,
    pFMember,
    pCargo,
    pChar,
    pContractTime,
    pDetSkill,
    pSexSkill,
    pBoxSkill,
    pLawSkill,
    pMechSkill,
    pJackSkill,
    pCarSkill,
    pNewsSkill,
    pDrogasSkill,
    pBalinhaSkill,
    pCookSkill,
    pFishSkill,
    Float:pHealth,
    Float:pSHealth,
    pInt,
    pLocal,
    pTeam,
    pModel,
    pPnumber,
    pPHousekey,
    pPbiskey,
    Float:pPos_x,
    Float:pPos_y,
    Float:pPos_z,
    pCarLic,
    pFlyLic,
    pBoatLic,
    pFishLic,
    pGunLic,
    pGun1,
    pGun2,
    pGun3,
    pGun4,
    pAmmo1,
    pAmmo2,
    pAmmo3,
    pAmmo4,
    pCarTime,
    pPayDay,
    pPayDayHad,
    pCDPlayer,
    pWins,
    pLoses,
    pAlcoholPerk,
    pDrugPerk,
    pMiserPerk,
    pPainPerk,
    pTraderPerk,
    pTut,
    pMissionNr,
    pWarns,
    pAdjustable,
    pFuel,
    pMarried,
    pBalinha,
    pRoadblock,
    pRequestingBackup,
    pMask,
    pMaskuse,
    pBarraca,
    pMarriedTo[128],
    pIsqueiro,
    pCigarros,
    pCarKey,
    pVeiculo,
};
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,
    bProdutos,
    bMaxProdutos,
    bPriceProd,
};
enum hInfo
{
    Float:hEntrancex,
    Float:hEntrancey,
    Float:hEntrancez,
    Float:hExitx,
    Float:hExity,
    Float:hExitz,
    hHealthx,
    hHealthy,
    hHealthz,
    hArmorrx,
    hArmorry,
    hArmorrz,
    hOwner[MAX_PLAYER_NAME],
    hDiscription[MAX_PLAYER_NAME],
    hValue,
    hHel,
    hArm,
    hInt,
    hLock,
    hOwned,
    hRooms,
    hRent,
    hRentabil,
    hTakings,
    hVec,
    hVcol1,
    hVcol2,
    hDate,
    hLevel,
};
enum hNews
{
    hTaken1,
    hTaken2,
    hTaken3,
    hTaken4,
    hTaken5,
    hAdd1[128],
    hAdd2[128],
    hAdd3[128],
    hAdd4[128],
    hAdd5[128],
    hContact1[128],
    hContact2[128],
    hContact3[128],
    hContact4[128],
    hContact5[128],
};
enum sbInfo
{
    sbOwned,
    sbOwner[64],
    sbMessage[128],
    sbExtortion[MAX_PLAYER_NAME],
    Float:sbEntranceX,
    Float:sbEntranceY,
    Float:sbEntranceZ,
    sbLevelNeeded,
    sbBuyPrice,
    sbEntranceCost,
    sbTill,
    sbLocked,
    sbInterior,
    sbProdutos,
    sbMaxProdutos,
    sbPriceProd,
};
enum pCrime
{
    pBplayer[32],
    pAccusing[32],
    pAccusedof[32],
    pVictim[32],
};
enum iInfo
{
    iAdmin[128],
    iMOTD[128],
    iPassword[128],
    iNeedPass,
    iLock,
    iPlayers,
};
enum mInfo
{
  mTitle[128],
  mText1[128],
  mText2[128],
  mText3[128],
  mText4[128],
  mText5[128],
  mText6[128],
  mText7[128],
  mText8[128],
  mText9[128],
  mText10[128],
  mText11[128],
  mText12[128],
  mText13[128],
  mText14[128],
  mText15[128],
  mText16[128],
  mText17[128],
  mText18[128],
  mGText1[128],
  mGText2[128],
  mGText3[128],
  mGText4[128],
  mGText5[128],
  mGText6[128],
    Float:mCP1[3],
    Float:mCP2[3],
    Float:mCP3[3],
    Float:mCP4[3],
    Float:mCP5[3],
    Float:mCP6[3],
    mReward,
    mToggle,
};
enum kInfo
{
  kTitle[128],
  kMaker[MAX_PLAYER_NAME],
  kText1[128],
  kText2[128],
  kText3[128],
  kText4[128],
  kText5[128],
  kText6[128],
  kText7[128],
  kText8[128],
  kText9[128],
  kText10[128],
  kText11[128],
  kText12[128],
  kText13[128],
  kText14[128],
  kText15[128],
  kText16[128],
  kText17[128],
  kText18[128],
  kGText1[128],
  kGText2[128],
  kGText3[128],
  kGText4[128],
  kGText5[128],
  kGText6[128],
    Float:kCP1[3],
    Float:kCP2[3],
    Float:kCP3[3],
    Float:kCP4[3],
    Float:kCP5[3],
    Float:kCP6[3],
    kNumber,
    kReward,
    kToggle,
};
enum hqLocks
{
    surlock,
    luclock,
    stlock,
    iolock,
};
enum OldSpeedoPos
{
    Float:sX,
    Float:sY,
    Float:sZ
}
enum e_votacao
{
    bool:iniciada,
    sim,
    nao,
    totall
}
enum SavePlayerPosEnum
{
  Float:LastX,
  Float:LastY,
  Float:LastZ
}
enum zInfo
{
    zOwner[64],
    zCOLOR[20],
  Float:zMinX,
  Float:zMinY,
  Float:zMaxX,
  Float:zMaxY,
};
enum pFishing
{
    pFish1[20],
    pFish2[20],
    pFish3[20],
    pFish4[20],
    pFish5[20],
    pWeight1,
    pWeight2,
    pWeight3,
    pWeight4,
    pWeight5,
    pFid1,
    pFid2,
    pFid3,
    pFid4,
    pFid5,
    pLastFish,
    pFishID,
    pLastWeight,
};
/*enum cInfo
{
    cStarted
}*/

enum pBoxingStats
{
  TitelName[128],
  TitelWins,
  TitelLoses,
};
enum cCKInfo
{
    cSendername[20],
    cGiveplayer[20],
    cUsed,
};
/*enum pPaperInfo
{
    PaperUsed,
    PaperMaker[20],
    PaperTitle[64],
    PaperText1[128],
    PaperText2[128],
    PaperText3[128],
    PaperText4[128],
    PaperText5[128],
    PaperText6[128],
    PaperText7[128],
    SafeSaving,
};*/

/*enum pPaper
{
    pMaker[20],
    pTitle[64],
    pLine1[128],
    pLine2[128],
    pLine3[128],
    pLine4[128],
    pLine5[128],
    pLine6[128],
    pLine7[128],
};*/

enum fInfo
{
    FamilyTaken,
    FamilyName[20],
    FamilyMOTD[128],
    FamilyCOLOR[20],
  FamilyLider[MAX_PLAYER_NAME],
    FamilyMembers,
    Float:FamilySpawn[4],
    FamilyInterior,
};
Isto??
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)