SA-MP Forums Archive
[SOLVED]Stuck at /rob command - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED]Stuck at /rob command (/showthread.php?tid=121274)



[SOLVED]Stuck at /rob command - x-unit - 16.01.2010

Hi ! I am making a Cops'n'Robbers GM and it's almost done except one thing, i don't know how to make a /rob command.
Can someone help me? Just a simple one, i'll customize myself.....

Thanks !


Re: Stuck at /rob command - Retardedwolf - 16.01.2010

SEARCH.
or
That is what script request topic is for.


Re: Stuck at /rob command - akis_tze - 16.01.2010

Код:
//====================================Rob=======================================
dcmd_rob(playerid, params[])
{
if(RobTimer1[playerid] == 1)
{
	SendClientMessage(playerid, COLOR_RED, "You must wait 15 sec to do that again!");
	return 1;
}
	if (strlen(params))
	{
		id = strval(params);
		if (IsPlayerConnected(id) && (gTeam[playerid] == TEAM_CIVIL))
		{
	 		if(GetDistanceBetweenPlayers( playerid, id) < 3.0 )
	 		{
		    if(id != playerid)
				{
				  if(PunishTime[playerid] != 1)
				  {
				    if(GetPlayerMoney(id) >= 250)
						{
						new rob[ 256 ];
		  	  	new robmoney = random( 500 );
		  	  	format( rob, sizeof( rob ), "You have been robbed, -%d$.",robmoney );
    				SendClientMessage( id, COLOR_RED, rob );
    				format( rob, sizeof( rob ), "You have robbed the player,for $%d.",robmoney );
    				SendClientMessage( playerid, COLOR_YELLOW, rob );
						GivePlayerMoney(playerid, robmoney);
						GivePlayerMoney(id, -robmoney);
						SetPlayerScore(playerid, GetPlayerScore( playerid ) +1 );
						SetPlayerWantedLevel( playerid, GetPlayerWantedLevel( playerid )+1 );
						GameTextForPlayer(id, "~r~You have been Robbed", 3500, 3);
						RobTimer1[playerid] = 1;
						SetPlayerScore(id, GetPlayerScore( id ) -1 );
			      SetTimerEx("FartTimerOff", 15000, false, "d", playerid);
			      format(Message,sizeof(Message),"*Police Dispatch* Robbery in progress, calling all cars. [Location: %s]",ReturnPlayerZone(playerid));
    				SendMessageToTeam( TEAM_COPS, COLOR_BLUE,Message);
    				format(Message,sizeof(Message),"*Agents Dispatch* Robbery in progress, calling all cars. [Location: %s]",ReturnPlayerZone(playerid));
    				SendMessageToTeam( TEAM_CIA, COLOR_WHITE,Message);
    				LoopingAnim(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0); // Rob
						}
						else
						{
						SendClientMessage(playerid, COLOR_RED , "This player has not money, to rob him!");
						}
					}
					else
					{
					SendClientMessage(playerid, COLOR_RED , "You can not use commands in prison!");
					}
				}
				else
				{
				SendClientMessage(playerid, COLOR_RED , "You can not rob your self!");
				}
			}
			else
			{
			SendClientMessage(playerid, COLOR_RED , "There is no player nearby!");
			}
		}
		else
		{
		SendClientMessage(playerid, COLOR_RED , "You are not a Civilian to use this, or there is no player nearby.");
		}
	}
	else
	{
	SendClientMessage(playerid, COLOR_RED, "Usage: \"/rob <playerid>\"");
	}
return 1;
}
That is an example for my cops and robbers server! i hope help you


Re: Stuck at /rob command - x-unit - 16.01.2010

Thanks [TGCAR] KotZ, i will try it now....i'll reply if it worked thnx


Re: Stuck at /rob command - SuperS82 - 16.01.2010

@ www.******.com

Whats the problem with someone asking for some help around here. Instead of posting SEARCH or Whatever, why not stop being lazy and make an actual post thats not going to look LAZY?

Anyways, if you still need some help with your /rob command, just let me know. I made a custom one for a roleplaying server with animations and timers, also made it give you a wanted level, sent a message to any online cops of the location being robbed, etc... etc... Was fun to make and use.


Re: Stuck at /rob command - x-unit - 16.01.2010

Quote:
Originally Posted by SuperS82
@ www.******.com

Whats the problem with someone asking for some help around here. Instead of posting SEARCH or Whatever, why not stop being lazy and make an actual post thats not going to look LAZY?

Anyways, if you still need some help with your /rob command, just let me know. I made a custom one for a roleplaying server with animations and timers, also made it give you a wanted level, sent a message to any online cops of the location being robbed, etc... etc... Was fun to make and use.
yea www.******.com is asshole . If you can give me a link for your "/rob" cmd because that from don't work for me....
You will help me a lot doing this. Thanks !!


Re: Stuck at /rob command - x-unit - 16.01.2010

i searched, but nothing work for me because they are with Teams or very complicated and i cant edit them because i get errors !


Re: Stuck at /rob command - SuperS82 - 16.01.2010

I feel it Sief!!

But I really hate seeing someone ask for help only to be told where to search. It would be useful if someone actually posted the actual links to the threads instead of making a lazy post to add to there lazy post count.

And just PM me and I will send it to you, also what GM are you using? There might be adjustments to be made.


[SOLVED]Stuck at /rob command - x-unit - 16.01.2010

I just want the command, i'll do the changes myself so if you can post it here thnx