30.07.2012, 04:01
Sorry for all these thread but im having another trouble, I created a job kind of and It's all setup but how can I make it so when we does /delivermats it will make sure he HAS the materials.
The two commands(/getmats & /delivermats):
Thank you for everybody helping me, means so much!
I need it to make sure it's in range aswell as making sure it has the package, if you look on /getmats it gives him the package: PlayerInfo[playerid][pGotMaterials] = 1; - So how can I make it so when he deliver's it removes the 1 package aswell as making sure he has it when using /delivermats
Thanks again!
EDIT: I tried it and once you do one materials run you can't do another, probably because it still has the 1 pGotMaterials, so how can I remove this once delivering too, thanks
The two commands(/getmats & /delivermats):
Код:
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_WHITE, "You aren't at the material's drop-off point!"); { SendClientMessage(playerid,COLOR_RED,"You delivered the package and recieved 250 materials."); PlayerInfo[playerid][pMaterials] = 250; } return 1; }
I need it to make sure it's in range aswell as making sure it has the package, if you look on /getmats it gives him the package: PlayerInfo[playerid][pGotMaterials] = 1; - So how can I make it so when he deliver's it removes the 1 package aswell as making sure he has it when using /delivermats
Thanks again!
EDIT: I tried it and once you do one materials run you can't do another, probably because it still has the 1 pGotMaterials, so how can I remove this once delivering too, thanks