Command Request
#1

Hello can someone help me with /robbank command for RP server ?
Thanks is Advance !
Reply
#2

The function search is better ...
Reply
#3

Quote:
Originally Posted by mazz57
Посмотреть сообщение
The function search is better ...
Guiding is better than spamming shit


I won't make the entire command for you, but I'll give you some tips:

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint

If the player is near the point where to /robbank

https://sampwiki.blast.hk/wiki/SetTimer

A timer to see if the player is still in range and another one to give the money.
Reply
#4

Quote:
Originally Posted by Snipa
Посмотреть сообщение
Guiding is better than spamming shit


I won't make the entire command for you, but I'll give you some tips:

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint

If the player is near the point where to /robbank

https://sampwiki.blast.hk/wiki/SetTimer

A timer to see if the player is still in range and another one to give the money.
Trust me , I tried 2 day's and didn't solve that , and I came here maybe someone can save me ....
Reply
#5

Quote:
Originally Posted by Sp3cter
Посмотреть сообщение
Trust me , I tried 2 day's and didn't solve that , and I came here maybe someone can save me ....
okay give me 5 minutes and i will post the entire command for you
Reply
#6

Quote:
Originally Posted by CROSS_Hunter
Посмотреть сообщение
okay give me 5 minutes and i will post the entire command for you
Ok , i'm waiting ^^
Reply
#7

...Anyone else ? Please I need it ...
Reply
#8

Up , someone save me !
Reply
#9

Код:
new timesrobbed[MAX_PLAYERS];
Public OnplayerConnect

Код:
timesrobbed[playerid] = 0;
public OnPlayerCommandText

Код:
if(strcmp(cmd, "/rob", true) == 0)
	{
        if(PlayerToPoint(3, playerid,// add Coordes here where players can rob this place))
		{
			if(timesrobbed[playerid] == 1)
			{
			    SendClientMessage(playerid, COLOR_YELLOW, "You cannot rob the Bank more then once per day!");
			}
			if(timesrobbed[playerid] == 0)
		    {
				GetPlayerName(playerid, sendername, sizeof(sendername));
				new robmoney = random(4000);
          		        ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 0, 0, 0, 0, 0); // Rob
          		        SendClientMessage(playerid, 0xFF0000FF, " ");
		                timesrobbed[playerid]+=1;
				format(string, sizeof(string), "** HQ: The 24/7 in Los Santos has been robbed!. **", sendername);
				SendRadioMessage(1, TEAM_BLUE_COLOR, string);
				WantedPoints[playerid]+=3; SetPlayerCriminal(playerid,255, "Robbing the 24/7!");
				SendClientMessage(playerid, COLOR_YELLOW, "You have been seen on the security cameras! Run away!");
				format(string,sizeof(string), "* %s points his gun at the clerk and attempts to rob the 24/7.", sendername);
				ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  				format(string, sizeof(string), "** You have successfully stolen $%d!",500);
   				SendClientMessage(playerid,COLOR_YELLOW,string);
				SafeGivePlayerMoney(playerid, 500);
 			}
		}
		return 1;
	}



REP+ If i helps you '*'
Reply
#10

Quote:
Originally Posted by BigBaws
Посмотреть сообщение
Код:
new timesrobbed[MAX_PLAYERS];
Public OnplayerConnect

Код:
timesrobbed[playerid] = 0;
public OnPlayerCommandText

Код:
if(strcmp(cmd, "/rob", true) == 0)
	{
        if(PlayerToPoint(3, playerid,// add Coordes here where players can rob this place))
		{
			if(timesrobbed[playerid] == 1)
			{
			    SendClientMessage(playerid, COLOR_YELLOW, "You cannot rob the Bank more then once per day!");
			}
			if(timesrobbed[playerid] == 0)
		    {
				GetPlayerName(playerid, sendername, sizeof(sendername));
				new robmoney = random(4000);
          		        ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 0, 0, 0, 0, 0); // Rob
          		        SendClientMessage(playerid, 0xFF0000FF, " ");
		                timesrobbed[playerid]+=1;
				format(string, sizeof(string), "** HQ: The 24/7 in Los Santos has been robbed!. **", sendername);
				SendRadioMessage(1, TEAM_BLUE_COLOR, string);
				WantedPoints[playerid]+=3; SetPlayerCriminal(playerid,255, "Robbing the 24/7!");
				SendClientMessage(playerid, COLOR_YELLOW, "You have been seen on the security cameras! Run away!");
				format(string,sizeof(string), "* %s points his gun at the clerk and attempts to rob the 24/7.", sendername);
				ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  				format(string, sizeof(string), "** You have successfully stolen $%d!",500);
   				SendClientMessage(playerid,COLOR_YELLOW,string);
				SafeGivePlayerMoney(playerid, 500);
 			}
		}
		return 1;
	}



REP+ If i helps you '*'
Don't working too many errors , i need all definitions !
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)