/robbank help? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /robbank help? (
/showthread.php?tid=345534)
/robbank help? -
Evation - 25.05.2012
Hello, i was playing a server before they had a full custom bank and stuff like that..
how can i get a robbank command?
ZCMD please.
Re: /robbank help? -
FalconX - 25.05.2012
Quote:
Originally Posted by Evation
Hello, i was playing a server before they had a full custom bank and stuff like that..
how can i get a robbank command?
ZCMD please.
|
pawn Код:
CMD:rob(playerid, params[])
{
if(!strcmp(params, "bank")) // check if the player types a parameter bank like this /rob bank
{
if(IsPlayerInRangeOfPoint(playerid, x, y, z) // it checks if the player is near bank or you can use the CHECKPOINT as well
{
// rest of your code of robbing bank.
}
else
{
SendClientMessage(playerid, -1, "ERROR: You are not near/in the bank"); // error message that the player is not in or near th ebank
}
}
else
{
SendClientMessage(playerid, -1, "ERROR: /rob [bank]"); // usage
}
return 1;
}
Just a framework of your command, I am just trying to help you even though this board is not SCRIPT REQUESTING board so you can use my command and use your functions.
Or you can just use this:
https://sampforum.blast.hk/showthread.php?tid=324202
-FalconX