Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- //**COLORS*//
- #define GREEN 0x21DD00FF
- #define RED 0xE60000FF
- #define ADMIN_RED 0xFB0000FF
- #define YELLOW 0xFFFF00FF
- #define ORANGE 0xF97804FF
- #define LIGHTRED 0xFF8080FF
- #define LIGHTBLUE 0x00C2ECFF
- #define PURPLE 0xB360FDFF
- #define PLAYER_COLOR 0xFFFFFFFF
- #define BLUE 0x1229FAFF
- #define LIGHTGREEN 0x38FF06FF
- #define DARKPINK 0xE100E1FF
- #define COLOR_DBLUE 0x2641FEAA
- #define DARKGREEN 0x008040FF
- #define ANNOUNCEMENT 0x6AF7E1FF
- #define COLOR_SYSTEM 0xEFEFF7AA
- #define GRAY 0xCECECEFF
- #define MAX_TAGS 200
- #define BALLAS_TAG 1529
- #define GROVE_TAG 1528
- #define VAGOS_TAG 1530
- #define AZTEC_TAG 1531
- #define GMOB_TAG 1526
- enum tagInfo
- {
- tgSprayer[24],
- Float:tgX,
- Float:tgY,
- Float:tgZ,
- };
- enum pInfo
- {
- pKey[128],
- pLevel,
- pAdmin,
- pSocio,
- pVIP,
- gPupgrade,
- pConnectTime,
- pReg,
- pSex,
- pFamily,
- pAge,
- pOrigem,
- pCK,
- pMuted,
- pExp,
- pCash,
- pConta,
- pCrimes,
- pKills,
- pDeaths,
- pArrested,
- pWantedDeaths,
- pPhoneBook,
- pLottoNr,
- pFishes,
- pBiggestFish,
- pEmprego,
- pPayCheck,
- pHeadValue,
- pJailed,
- pJailTime,
- pMats,
- pDrogas,
- pDrogas2,
- pDrogas3,
- 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,
- pAPaisanaCIA,
- pRoadblock,
- pRequestingBackup,
- pMask,
- pMaskuse,
- pBarraca,
- pMarriedTo[128],
- pSpawn,
- pBan,
- pSafeDrogas,
- pSafeDrogas2,
- pSafeDrogas3,
- pVeiculo,
- pCarKey,
- psMats,
- VipVaga,
- adminID,
- vipID,
- pPHouseCarkey,
- pRoadPregos,
- };
- new PlayerInfo[MAX_PLAYERS][pInfo];
- new Spray[MAX_TAGS],Tag,Sprayed[MAX_PLAYERS];
- new TagInfo[MAX_TAGS][tagInfo];
- forward OnPlayerSpray(playerid);
- public OnFilterScriptInit() // > OnGameModeInit
- {
- Tag = 0;
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- Sprayed[playerid] = 0;
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/rpit", true)==0)
- {
- if (Tag == 0) return SendClientMessage(playerid,RED,"Pichações não encontradas");
- SendClientMessageToAll(COLOR_DBLUE, "[BSF] Todas as pichações foram removidas pelo administrador.");
- if (!PlayerInfo[playerid][pAdmin] >= 4) return SendClientMessage(playerid,RED,"Voce nao é um admin");
- for(new stags = 1; stags <= 200; stags++)
- {
- DestroyObject(Spray[stags]);
- Tag = 0;
- }
- return 1;
- }
- if(strcmp(cmdtext, "/rpi", true)==0)
- {
- new count;
- new frm[128];
- for(new i = 0; i < MAX_TAGS; i++)
- {
- if(PlayerToPoint(playerid,2,TagInfo[i][tgX],TagInfo[i][tgY],TagInfo[i][tgZ]))
- {
- GetPlayerName(playerid, frm, MAX_PLAYER_NAME);
- if (!strcmp(TagInfo[i][tgSprayer],frm))
- {
- DestroyObject(Spray[i]);
- TagInfo[i][tgX] = 0;
- TagInfo[i][tgY] = 0;
- TagInfo[i][tgZ] = 0;
- Spray[i] = INVALID_OBJECT_ID;
- strmid(TagInfo[i][tgSprayer], " ", 0, 1);
- Tag--;
- count++;
- }
- }
- }
- format(frm, sizeof(frm), " Voce removeu as pichações de %d", count);
- SendClientMessage(playerid, GRAY, frm);
- return 1;
- }
- if(strcmp(cmdtext, "/pdelet2", true)==0)
- {
- if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED, " You're not an admin");
- new count;
- new frm[128];
- for(new i = 0; i < MAX_TAGS; i++)
- {
- if(PlayerToPoint(playerid,2,TagInfo[i][tgX],TagInfo[i][tgY],TagInfo[i][tgZ]))
- {
- DestroyObject(Spray[i]);
- TagInfo[i][tgX] = 0;
- TagInfo[i][tgY] = 0;
- TagInfo[i][tgZ] = 0;
- Spray[i] = INVALID_OBJECT_ID;
- strmid(TagInfo[i][tgSprayer], " ", 0, 1);
- Tag--;
- count++;
- }
- }
- format(frm, sizeof(frm), " You have deleted %d tags", count);
- SendClientMessage(playerid, GRAY, frm);
- return 1;
- }
- if(strcmp(cmdtext, "/autor", true)==0)
- {
- if (Tag == 0) return SendClientMessage(playerid,RED,"Nenhuma pichação por perto");
- new string[128];
- for(new stags = 0; stags < MAX_TAGS; stags++)
- {
- if (PlayerToPoint(playerid,2,TagInfo[stags][tgX],TagInfo[stags][tgY],TagInfo[stags][tgZ]))
- {
- printf("%d - %d",Tag,stags);
- format(string,sizeof(string),"Pichador: %s - pichação #%d",TagInfo[stags][tgSprayer],stags);
- SendClientMessage(playerid,GRAY,string);
- }
- }
- return 1;
- }
- return 0;
- }
- public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
- {
- if (newkeys == KEY_FIRE && GetPlayerWeapon(playerid) == 41)
- {
- SetTimerEx("OnPlayerSpray",2000,0,"d",playerid);
- }
- return 1;
- }
- public OnPlayerSpray(playerid)
- {
- new keys,updown,leftright;
- GetPlayerKeys(playerid,keys,updown,leftright);
- if (keys == KEY_FIRE)
- {
- if (GetPlayerSkin(playerid) >= 102 && GetPlayerSkin(playerid) <= 104) // Ballas
- {
- for(new stags = Tag; stags < MAX_TAGS; stags++)
- {
- if (Tag >= MAX_TAGS-1) return SendClientMessage(playerid,RED,"Voce nao pode pichar por aqui, essa area ja esta cheia.");
- new Float:X, Float:Y, Float:Z,Float:A,name[24];
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- GetPlayerName(playerid,name,24);
- X += (1 * floatsin(-A, degrees));
- Y += (1 * floatcos(-A, degrees));
- TagInfo[stags][tgX] = X;
- TagInfo[stags][tgY] = Y;
- TagInfo[stags][tgZ] = Z;
- Sprayed[playerid] = 1;
- Tag += 1;
- Spray[stags] = CreateObject(BALLAS_TAG, X, Y, Z, 0.0, 0.0, A+90);
- GameTextForPlayer(playerid,"~r~~h~Pichacao completa!",3000,3);
- PlayerPlaySound(playerid,1057,0,0,0);
- strmid(TagInfo[stags][tgSprayer], name, 0, strlen(name),128);
- printf("[PICHAÇÃO] %s - %d",TagInfo[stags][tgSprayer],stags);
- break;
- }
- }
- if (GetPlayerSkin(playerid) >= 114 && GetPlayerSkin(playerid) <= 116) // aztecas
- {
- for(new stags = Tag; stags < MAX_TAGS; stags++)
- {
- if (Tag >= MAX_TAGS-1) return SendClientMessage(playerid,RED,"Voce nao pode pichar por aqui, essa area ja esta cheia.");
- new Float:X, Float:Y, Float:Z,Float:A,name[24];
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- GetPlayerName(playerid,name,24);
- X += (1 * floatsin(-A, degrees));
- Y += (1 * floatcos(-A, degrees));
- TagInfo[stags][tgX] = X;
- TagInfo[stags][tgY] = Y;
- TagInfo[stags][tgZ] = Z;
- Sprayed[playerid] = 1;
- Tag += 1;
- Spray[stags] = CreateObject(AZTEC_TAG, X, Y, Z, 0.0, 0.0, A+90);
- GameTextForPlayer(playerid,"~r~~h~Pichacao completa!",3000,3);
- PlayerPlaySound(playerid,1057,0,0,0);
- strmid(TagInfo[stags][tgSprayer], name, 0, strlen(name),128);
- printf("[PICHAÇÃO] %s - %d",TagInfo[stags][tgSprayer],stags);
- break;
- }
- }
- if (GetPlayerSkin(playerid) >= 108 && GetPlayerSkin(playerid) <= 110) // vagos
- {
- for(new stags = Tag; stags < MAX_TAGS; stags++)
- {
- if (Tag >= MAX_TAGS-1) return SendClientMessage(playerid,RED,"Voce nao pode pichar por aqui, essa area ja esta cheia.");
- new Float:X, Float:Y, Float:Z,Float:A,name[24];
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- GetPlayerName(playerid,name,24);
- X += (1 * floatsin(-A, degrees));
- Y += (1 * floatcos(-A, degrees));
- TagInfo[stags][tgX] = X;
- TagInfo[stags][tgY] = Y;
- TagInfo[stags][tgZ] = Z;
- Sprayed[playerid] = 1;
- Tag += 1;
- Spray[stags] = CreateObject(VAGOS_TAG, X, Y, Z, 0.0, 0.0, A+90);
- GameTextForPlayer(playerid,"~r~~h~Pichacao completa!",3000,3);
- PlayerPlaySound(playerid,1057,0,0,0);
- strmid(TagInfo[stags][tgSprayer], name, 0, strlen(name),128);
- printf("[PICHAÇÃO] %s - %d",TagInfo[stags][tgSprayer],stags);
- break;
- }
- }
- if (GetPlayerSkin(playerid) >=132 && GetPlayerSkin(playerid) <= 236) // gmob
- {
- for(new stags = Tag; stags < MAX_TAGS; stags++)
- {
- if (Tag >= MAX_TAGS-1) return SendClientMessage(playerid,RED,"Está area ta cheia de pixação.");
- new Float:X, Float:Y, Float:Z,Float:A,name[24];
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- GetPlayerName(playerid,name,24);
- X += (1 * floatsin(-A, degrees));
- Y += (1 * floatcos(-A, degrees));
- TagInfo[stags][tgX] = X;
- TagInfo[stags][tgY] = Y;
- TagInfo[stags][tgZ] = Z;
- Sprayed[playerid] = 1;
- Tag += 1;
- Spray[stags] = CreateObject(GMOB_TAG, X, Y, Z, 0.0, 0.0, A+90);
- GameTextForPlayer(playerid,"~r~~h~Pichacao completa!",3000,3);
- PlayerPlaySound(playerid,1057,0,0,0);
- strmid(TagInfo[stags][tgSprayer], name, 0, strlen(name),128);
- printf("[PICHAÇÃO] %s - %d",TagInfo[stags][tgSprayer],stags);
- break;
- }
- }
- if (GetPlayerSkin(playerid) >= 105 && GetPlayerSkin(playerid) <= 107) // Grove
- {
- for(new stags = Tag; stags < MAX_TAGS; stags++)
- {
- if (Tag >= MAX_TAGS-1) return SendClientMessage(playerid,RED,"Voce nao pode pichar por aqui, essa area ja esta cheia.");
- new Float:X, Float:Y, Float:Z,Float:A,name[24];
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- GetPlayerName(playerid,name,24);
- X += (1 * floatsin(-A, degrees));
- Y += (1 * floatcos(-A, degrees));
- TagInfo[stags][tgX] = X;
- TagInfo[stags][tgY] = Y;
- TagInfo[stags][tgZ] = Z;
- Sprayed[playerid] = 1;
- Tag += 1;
- Spray[stags] = CreateObject(GROVE_TAG, X, Y, Z, 0.0, 0.0, A+90);
- GameTextForPlayer(playerid,"~b~~h~Pichacao completa!",3000,3);
- PlayerPlaySound(playerid,1057,0,0,0);
- strmid(TagInfo[stags][tgSprayer], name, 0, strlen(name),128);
- printf("[PICHAÇÃO] %s - %d",TagInfo[stags][tgSprayer],stags);
- break;
- }
- }
- }
- return 1;
- }
- stock PlayerToPoint(playerid,Float:radi, Float:px, Float:py, Float:pz)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:x, Float:y, Float:z;
- new Float:ox, Float:oy, Float:oz;
- GetPlayerPos(playerid, ox, oy, oz);
- x = (ox -px);
- y = (oy -py);
- z = (oz -pz);
- if (((x < radi) && (x > -radi)) && ((y < radi) && (y > -radi)) && ((z < radi) && (z > -radi))) return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement