Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- YCMD:uzmipoklon(playerid, params[], help)
- {
- if(ukupnopaketica == 0) return SCM(playerid, -1, ""ZUTA"ERROR: "BELA"Nema ni jedog paketica da bi ste ga trazili!!");
- {
- for(new weed = 0; weed < sizeof(GiftInfo); weed++)
- {
- if(IsPlayerInRangeOfPoint(playerid,2.0,GiftInfo[weed][giX],GiftInfo[weed][giY],GiftInfo[weed][giZ]))
- {
- if(GiftInfo[weed][giPlanted] == 1 && GiftInfo[weed][giX] != 0.0 && GiftInfo[weed][giY] != 0.0 && GiftInfo[weed][giZ] != 0.0)
- {
- new rands = randomExx(1,8);
- if(rands == 1)
- {
- PlayerInfo[playerid][pEuro] += 300;
- SCM(playerid, GRAD2, "Dobili ste 300€ u ovom poklonu.");
- }
- if(rands == 2)
- {
- g_NovacPlus(playerid,5000);
- SCM(playerid, GRAD2, "Dobili ste 5000$ u ovom poklonu.");
- }
- if(rands == 3)
- {
- PlayerInfo[playerid][pMats] += 1000;
- SCM(playerid, GRAD2, "Dobili ste 1KG matsa u ovom poklonu.");
- }
- if(rands == 4)
- {
- PlayerInfo[playerid][pDroga] += 250;
- SCM(playerid, GRAD2, "Dobili ste 250g Droge u poklonu");
- }
- if(rands == 5)
- {
- g_GivePlayerWeapon(playerid, 24, 120);
- SCM(playerid, GRAD2, "Dobili ste Deagle sa 120 metaka");
- }
- if(rands == 6)
- {
- g_NovacPlus(playerid,50000);
- SCM(playerid, GRAD2, "Dobili ste 50000$ u ovom poklonu.");
- }
- if(rands == 7)
- {
- PlayerInfo[playerid][pEuro] += 500;
- SCM(playerid, GRAD2, "Dobili ste 500€ u ovom poklonu.");
- }
- if(rands == 8)
- {
- g_GivePlayerWeapon(playerid, 31, 500);
- SCM(playerid, GRAD2, "Dobili ste M4 sa 500 metaka");
- }
- new string[256];
- ApplyAnimation(playerid, "BOMBER","BOM_Plant_In",4.0,0,0,0,0,0);
- DestroyDynamicObject(GiftInfo[weed][giObject]);
- GiftInfo[weed][giX] = 0.0;
- GiftInfo[weed][giY] = 0.0;
- GiftInfo[weed][giZ] = 0.0;
- GiftInfo[weed][giPlanted] = 0;
- format(string, sizeof(string), "%s je naso poklon na lokaci %s", GetName(playerid),GetPlayerLocation(playerid));
- SCMTA(-1, string);
- DestroyDynamic3DTextLabel(GiftText[weed]);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- ukupnopaketica--;
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment