16.02.2014, 15:09
Hello everyone,
I am using the VGRP script for a while,
And i getted this question some several times, but i dont know how to fix it.
It is the /getseeds command. To get seeds to plant them
Can someone please help me? Here is the CMD:
HERE IS THE WORKING ONE FOR CRACK:
Please help.
Bradley
I am using the VGRP script for a while,
And i getted this question some several times, but i dont know how to fix it.
It is the /getseeds command. To get seeds to plant them
Can someone please help me? Here is the CMD:
Код:
CMD:getseeds(playerid, params[]) { if(PlayerInfo[playerid][pJob] != 4 && PlayerInfo[playerid][pJob2] != 4) { SendClientMessageEx(playerid, COLOR_GREY, " You're not a drug dealer."); return 1; } if(PlayerInfo[playerid][pWSeeds] > 0) { SendClientMessageEx(playerid, COLOR_GREY, "You already have a bag of seeds, use them first."); return 1; } if(GetPlayerCash(playerid) < 10000) { SendClientMessageEx(playerid, COLOR_GREY, " You do not have $10,000."); return 1; } new mypoint = -1; for (new i=0; i<MAX_POINTS; i++) { if (IsPlayerInRangeOfPoint(playerid, 3.0, Points[i][Pointx], Points[i][Pointy], Points[i][Pointz]) && Points[i][Type] == 3) { mypoint = i; } } if (mypoint == -1) { SendClientMessageEx(playerid, COLOR_GREY, " You are not at the Drug House!"); return 1; } if(Points[mypoint][Stock] < 1 && PlayerInfo[playerid][pDonateRank] < 1) return SendClientMessageEx(playerid, COLOR_GREY, " This drug house doesn't have any seeds."); if(PlayerInfo[playerid][pDonateRank] < 1) { new string[32]; Points[mypoint][Stock] -= 1; format(string, sizeof(string), " POT AVAILABLE: %d/1000.", Points[mypoint][Stock]); UpdateDynamic3DTextLabelText(Points[mypoint][TextLabel], COLOR_YELLOW, string); } PlayerInfo[playerid][pWSeeds] += 3; SendClientMessageEx(playerid, COLOR_LIGHTBLUE, " You have purchased a bag of Pot Seeds from the Drug House. "); GivePlayerCash(playerid, -10000); GameTextForPlayer(playerid, "~r~-$10000", 3000, 1 ); for(new i = 0; i < sizeof(FamilyInfo); i++) { if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0) { FamilyInfo[i][FamilyBank] += 2500; } } return 1; }
Код:
CMD:getcrack(playerid, params[]) { new string[128], amount; if(sscanf(params, "d", amount)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /getcrack [amount]"); new tel; new price; new level = PlayerInfo[playerid][pDrugsSkill]; if(level >= 0 && level <= 50) { tel = 500; if(amount < 1 || amount > 5) { SendClientMessageEx(playerid, COLOR_GREY, " You can't go above 5 at your Skill Level!"); return 1; } } else if(level >= 51 && level <= 100) { tel = 500; if(amount < 1 || amount > 5) { SendClientMessageEx(playerid, COLOR_GREY, " You can't go above 10 at your Skill Level!"); return 1; } } else if(level >= 101 && level <= 200) { tel = 500; if(amount < 1 || amount > 15) { SendClientMessageEx(playerid, COLOR_GREY, " You can't go above 15 at your Skill Level!"); return 1; } } else if(level >= 201 && level <= 400) { tel = 500; if(amount < 1 || amount > 20) { SendClientMessageEx(playerid, COLOR_GREY, " You can't go above 20 at your Skill Level!"); return 1; } } else if(level >= 401) { tel = 500; if(amount < 1 || amount > 25) { SendClientMessageEx(playerid, COLOR_GREY, " You can't go above 25 at your Skill Level!"); return 1; } } new mypoint = -1; for (new i=0; i<MAX_POINTS; i++) { if (IsPlayerInRangeOfPoint(playerid, 3.0, Points[i][Pointx], Points[i][Pointy], Points[i][Pointz]) && Points[i][Type] == 4) { mypoint = i; } } if(IsPlayerInRangeOfPoint(playerid, 50.0, 2345.8533,-1185.0392,1027.9766)) mypoint = 38312; if (mypoint == -1) { SendClientMessageEx(playerid, COLOR_GREY, " You are not at the Crack Lab!"); return 1; } if ( PlayerInfo[playerid][pCrack] >= 25) { SendClientMessageEx(playerid, COLOR_GRAD2, " You have reached your crack limit of 25 crack."); return 1; } if (PlayerInfo[playerid][pJob] == 4 || PlayerInfo[playerid][pJob2] == 4) { price = amount * tel; if(AmountOfCrack < amount && PlayerInfo[playerid][pDonateRank] < 1) return SendClientMessageEx(playerid, COLOR_GREY, " This Crack Lab doesn't have that much crack!"); if(GetPlayerCash(playerid) > price) { format(string, sizeof(string), "* You bought %d grams for $%d.", amount, price); SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string); GivePlayerCash(playerid, -price); PlayerInfo[playerid][pCrack] += amount; if(PlayerInfo[playerid][pDonateRank] < 1) Points[mypoint][Stock] = Points[mypoint][Stock]-amount; format(string, sizeof(string), " CRACK AVAILABLE: %d/500.", Points[mypoint][Stock]); UpdateDynamic3DTextLabelText(Points[mypoint][TextLabel], COLOR_YELLOW, string); for(new i = 0; i < sizeof(FamilyInfo); i++) { if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0) { FamilyInfo[i][FamilyBank] = FamilyInfo[i][FamilyBank]+price/2; } } } else { SendClientMessageEx(playerid, COLOR_GREY, " You cant afford the Drugs!"); return 1; } } else { SendClientMessageEx(playerid, COLOR_GREY, " You're not a drug dealer."); return 1; } return 1; }
Bradley