31.07.2012, 00:50
Okay, I had two commands:
When you get the the materials it gives you pGotMaterials = 1 - So it gives you 1 of the package basically, and on the /delivermats it makes sure you have the pGotMaterials otherwise you cant do /delivermats at the point since you can abuse it. But when you do /delivermats it doesn't take away the pGotMaterials and it doesn't give you the 250 materials. It says you have delivered them but it doesn't remove it and give you the materials so I can't mat run since I don't get the materials and I don't get the package, anyone who can fix this? Also, make it so you must have a job to, so like if(PlayerInfo[playerid][pJob] == 0) return SCM(playerid, COLOR_WHITE, "You don't have the arms dealer job!");
I don't know if thats ride so could someone implement having the job on both cmds /delivermats and /getmats - if you have pJob == 1 then you have the job if you have anything above or below you dont have it.
So could someone fix this please? +rep to anyone who can, thanks so much!
Код:
CMD:getmats(playerid, params[]) { if(IsPlayerInRangeOfPoint(playerid, 3.0, 1168.90, 1361.76, 10.50)) return SCM(playerid, COLOR_WHITE, "You aren't at the material's pickup point!"); { SendClientMessage(playerid,COLOR_RED,"You have gotten a materials package, deliver it to the checkpoint to recieve the materials."); SetPlayerCheckpoint(playerid, 2179.7886,-2263.6206,14.7734, 3.0); PlayerInfo[playerid][pGotMaterials] = 1; } return 1; } CMD:delivermats(playerid, params[]) { if(IsPlayerInRangeOfPoint(playerid, 5.0, 2179.7886,-2263.6206,14.7734)) return SCM(playerid, COLOR_RED, "You delivered the package and recieved 250 materials."); { if(PlayerInfo[playerid][pGotMaterials] == 0) return SendClientMessage(playerid, COLOR_GREY, "You do not have the packages."); PlayerInfo[playerid][pMaterials] += 250; PlayerInfo[playerid][pGotMaterials] = 0; } SendClientMessage(playerid, COLOR_WHITE, "You aren't in-range of the material's drop-off!"); return 1; }
I don't know if thats ride so could someone implement having the job on both cmds /delivermats and /getmats - if you have pJob == 1 then you have the job if you have anything above or below you dont have it.
So could someone fix this please? +rep to anyone who can, thanks so much!