11.11.2012, 14:45
pawn Код:
CMD:getmats(playerid, params[])
{
new string[128], packages;
if(PlayerInfo[playerid][pJobSkill][JOB_WSMUGGLER] < 100) packages = 5;
else if(PlayerInfo[playerid][pJobSkill][JOB_WSMUGGLER] < 300) packages = 10;
else if(PlayerInfo[playerid][pJobSkill][JOB_WSMUGGLER] < 700) packages = 15;
else if(PlayerInfo[playerid][pJobSkill][JOB_WSMUGGLER] < 1200) packages = 20;
else if(PlayerInfo[playerid][pJobSkill][JOB_WSMUGGLER] >= 1200) packages = 25;
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pJob] != JOB_WSMUGGLER && PlayerInfo[playerid][pVIPJob] != JOB_DSMUGGLER) return SendClientMessage(playerid, COLOR_GREY, "You are not a Weapons Smuggler.");
if(PlayerInfo[playerid][pMPackages]) return SendClientMessage(playerid, COLOR_GREY, "You already have packages.");
if(!IsPlayerInRangeOfPoint(playerid, 3, -172.3404,1022.7706,19.7422)) return SendClientMessage(playerid, COLOR_GREY, "You are not near the Materials Pickup.");
if(PlayerInfo[playerid][pMoney] < packages*25) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money on you.");
PlayerInfo[playerid][pMPackages] = 1;
GiveZaiatMoney(playerid, -(packages*25));
if(PointInfo[3][pOwner])
{
new idx = PointInfo[3][pOwner];
FamInfo[idx][fMoney] += packages*25;
PointInfo[3][pProfit] += packages*25;
}
format(string, sizeof(string), "* %s has loaded %d materials packages from the pickup.", RPN(playerid), packages);
SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
format(string, sizeof(string), "* You have loaded {FF6347}%d materials{33CCFF} packages for {FF6347}$%d{33CCFF}, deliver them to the Materials Dropoff. (Checkpoint)", packages, packages*25);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SetPlayerCheckpoint(playerid,-21.4871,1159.8158,19.3902,3);
AntiTPTimer[playerid] = SetTimerEx("AntiTPHacks", 30000, false, "d", playerid);
return 1;
}
![Sad](images/smilies/sad.gif)
Anyone know a resolution?
Regards
Oscii