SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 06/08/2012, 11:10 PM   #1
RLGaming
Huge Clucker
 
Join Date: Dec 2011
Posts: 358
Reputation: 27
Default /tazer and /r help

Can someone make me a tazer cmd?

It would be someone like:
CMD:tazer(playerid, params[])
{
if(PlayerInfo[playerid][pLSPD] == 1;


Idk, but if there =1 to LSPD there apart of the LSPD so they can use it, and it goes to rank six

So could anyone help me or give me a cmd please, i cant get it to work

also my /r command will only send 3 characters
CMD:r(playerid, params[])
{
new sendingname[MAX_PLAYER_NAME], string[160];
new rank = PlayerInfo[playerid][pLSPD];
if(rank < 1) return SCM(playerid, COLOR_WHITE, "You are not a member of the LSPD.");
if(isnull(params)) return SCM(playerid, COLOR_WHITE, "USAGE: /r [radio chat]");
GetPlayerName(playerid, sendingname, sizeof(sendingname));
new i;
while(sendingname[i])
{
if(sendingname[i] == '_') sendingname[i] = ' ';
i++;
}
format(string, sizeof(sendingname),"* (R%d) %s: %s", rank, sendingname, params);
SendLSPDMessage(COLOR_LIGHTBLUE, string);
return 1;
}

I twill send 3 chars only, help, it's not because of the 160 string i tried 128 etc

thanks guys<3
RLGaming is offline   Reply With Quote
Old 06/08/2012, 11:14 PM   #2
sampplayer12
Big Clucker
 
sampplayer12's Avatar
 
Join Date: Jun 2012
Location: United States of America
Posts: 109
Reputation: 17
Default Re: /tazer and /r help

Code:
CMD:tazer(playerid, params[])
{
	if(gTeam[playerid] == 2 || IsACop(playerid) || (PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pDivision] == 2) || (PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pRank] >= 5) || (PlayerInfo[playerid][pMember] == 9 && PlayerInfo[playerid][pDivision] == 1))
	{
		new string[128];
		if(PlayerInfo[playerid][pConnectTime] < 0 || PlayerInfo[playerid][pWRestricted] > 0) return SendClientMessageEx(playerid, COLOR_GRAD2, "You cannot use this as you are currently restricted from possessing weapons!");

		if(IsPlayerInAnyVehicle(playerid))
		{
			SendClientMessageEx(playerid, COLOR_GREY, "You can't do this while you're in a vehicle.");
			return 1;
		}

		if(GetPVarInt(playerid, "IsInArena") >= 0)
		{
			SendClientMessageEx(playerid, COLOR_WHITE, "You can't do this right now, you are in a arena!");
			return 1;
		}
		if(GetPVarInt( playerid, "EventToken") != 0)
		{
			SendClientMessageEx(playerid, COLOR_GREY, "You can't use the tazer while you're in an event.");
			return 1;
		}
		if(PlayerCuffedTime[playerid] > 0)
		{
			SendClientMessageEx(playerid, COLOR_GREY, "You can't do this right now.");
			return 1;
		}
		if(GetPVarInt(playerid, "Injured") == 1)
		{
			SendClientMessageEx(playerid, COLOR_GREY, "You can't do this right now.");
			return 1;
		}

		if(PlayerInfo[playerid][pJailed] > 0)
		{
			SendClientMessageEx(playerid, COLOR_WHITE, "You cannot use this in jail/prison.");
			return 1;
		}
		if(PlayerCuffed[playerid] >= 1) {
			SendClientMessageEx(playerid, COLOR_WHITE, "You cannot use this while tazed/cuffed.");
			return 1;
		}

		if(pTazer[playerid] == 0)
		{
			pTazerReplace[playerid] = PlayerInfo[playerid][pGuns][2];
			if(PlayerInfo[playerid][pGuns][2] != 0) RemovePlayerWeapon(playerid, PlayerInfo[playerid][pGuns][2]);
			format(string, sizeof(string), "* %s unholsters their tazer.", GetPlayerNameEx(playerid));
			ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			GivePlayerValidWeapon(playerid, 23, 60000);
			pTazer[playerid] = 1;
		}
		else
		{
			RemovePlayerWeapon(playerid, 23);
			GivePlayerValidWeapon(playerid, pTazerReplace[playerid], 60000);
			format(string, sizeof(string), "* %s holsters their tazer.", GetPlayerNameEx(playerid));
			ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			pTazer[playerid] = 0;
		}
	}
	else
	{
		SendClientMessageEx(playerid, COLOR_GREY, "   You are not a Cop / FBI / Coastguard!");
		return 1;
	}
	return 1;
}



Code:
CMD:r(playerid, params[])
{
	new string[128];
	if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: (/r)adio [radio chat]");

	new rank[64], division[16];
	switch (PlayerInfo[playerid][pMember])
	case 1:
		{
			switch(PlayerInfo[playerid][pRank])
			{
			case 1: rank = "Officer";
			case 2: rank = "Detective";
			case 3: rank = "Sergeant";
			case 4: rank = "Lieutenant";
			case 5: rank = "Captain";
			case 6: rank = "Chief";
			default: rank = "Cadet";
			}
			switch(PlayerInfo[playerid][pDivision])
			{
			case 2: division = " (II)";
			case 3: division = " (FTO)";
			case 4: division = " (IA)";
			case 5: division = " (SWAT)";
			default: division = "";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, division, GetPlayerNameEx(playerid), params);
			SendRadioMessage(1, RADIO, string);
		}
	case 2:
		{
			switch(PlayerInfo[playerid][pRank])
			{
			case 1: rank = "Staff";
			case 2: rank = "Agent";
			case 3: rank = "Senior Agent";
			case 4: rank = "Special Agent";
			case 5: rank = "Assistant Director";
			case 6: rank = "Director";
			default: rank = "Intern";
			}
			switch(PlayerInfo[playerid][pDivision])
			{
			case 2: division = " (GU)";
			case 3: division = " (FAN)";
			case 4: division = " (CID)";
			case 5: division = " (IA)";
			case 6: division = " (NSB)";
			default: division = "";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, division, GetPlayerNameEx(playerid), params);
			SendRadioMessage(2, RADIO, string);
		}
	case 3:
		{
			switch(PlayerInfo[playerid][pRank])
			{
				case 1: rank = "Trainee";
				case 2: rank = "Operator";
				case 3: rank = "Security";
				case 4: rank = "Foreman";
				case 5: rank = "Supervisor";
				case 6: rank = "Director";
				default: rank = "Intern";
			}
			switch(PlayerInfo[playerid][pDivision])
			{
			    case 1: division = " (HR)";
				case 2: division = " (ERT)";
				case 3: division = " (IA)";
				case 4: division = " (SO)";
				default: division = "";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, division, GetPlayerNameEx(playerid), params);
			SendRadioMessage(3, RADIO, string);
		}
		case 4:
		{
			switch(PlayerInfo[playerid][pRank])
			{
				case 1: rank = "EMT Intermediate";
				case 2: rank = "EMT Paramedic";
				case 3: rank = "Lieutenant";
				case 4: rank = "Captain";
				case 5: rank = "Deputy Chief";
				case 6: rank = "Chief";
				default: rank = "EMT Basic";
			}
			switch(PlayerInfo[playerid][pDivision])
			{
			    case 1: division = " (FD)";
				case 2: division = " (LF)";
				case 3: division = " (T&R)";
				default: division = "";
			}

			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, division, GetPlayerNameEx(playerid), params);
			SendRadioMessage(4, TEAM_CYAN_COLOR, string);
		}
	case 5:
		{
			switch(PlayerInfo[playerid][pRank])
			{
			case 1: rank = "Clerk of Court";
			case 2: rank = "District Attorney";
			case 3: rank = "District Judge";
			case 4: rank = "Appellate Judge";
			case 5: rank = "Associate Justice of the Supreme Court";
			case 6: rank = "Chief Justice of the Supreme Court";
			default: rank = "Clerk of Court";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, GetPlayerNameEx(playerid), params);
			SendRadioMessage(5, RADIO, string);
		}
	case 6:
		{
			switch(PlayerInfo[playerid][pRank])
			{
				    case 1: rank = "Body Guard";
			     	case 2: rank = "Driver";
				    case 3: rank = "Secretary";
				    case 4: rank = "Secret Agent";
			    	case 5: rank = "Chief of Staff";
				    case 6: rank = "Governor";
				    default: rank = "Cabinet";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, GetPlayerNameEx(playerid), params);
			SendRadioMessage(6, RADIO, string);
		}
	case 7:
		{
			switch(PlayerInfo[playerid][pRank])
			{
            case 1: rank = "Corporal";
			case 2: rank = "Sergeant";
			case 3: rank = "Lieutenant";
			case 4: rank = "Captain";
			case 5: rank = "UnderSheriff";
			case 6: rank = "Sheriff";
			default: rank = "Deputy";
			}
			switch(PlayerInfo[playerid][pDivision])
			{
			case 2: division = " (TOWING)";
			case 3: division = " (SCU)";
			case 4: division = " (SWAT)";
			case 5: division = " (FTO)";
			default: division = "";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, division, GetPlayerNameEx(playerid), params);
			SendRadioMessage(7, RADIO, string);
		}
	case 9:
		{
			switch(PlayerInfo[playerid][pRank])
			{
				case 1: rank = "Local Reporter";
				case 2: rank = "Local Editor";
				case 3: rank = "Network Anchor";
				case 4: rank = "Network Editor";
				case 5: rank = "Asst. Network Producer";
				case 6: rank = "Network Producer";
				default: rank = "Intern";
			}
			switch(PlayerInfo[playerid][pDivision])
			{
			    case 1: division = " (Security)";
			    case 2: division = " (IA)";
			    case 3: division = " (TS)";
			    case 4: division = " (TnR)";
			    default: division = "";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, division, GetPlayerNameEx(playerid), params);
			SendRadioMessage(9, TEAM_NEWS_COLOR, string);
		}
	case 11:
		{
			switch(PlayerInfo[playerid][pRank])
			{
				case 0: rank = "Private";
 				case 1: rank = "Corporal";
 				case 2: rank = "Sergeant";
 				case 3: rank = "Lieutenant";
 				case 4: rank = "Captain";
 				case 5: rank = "Major";
 				case 6: rank = "General";
				default: rank = "Private";
			}
			switch(PlayerInfo[playerid][pDivision])
			{
				case 1: division = " (AIR)";
			    case 2: division = " (ARM)";
			    case 3: division = " (VET)";
				case 4: division = " (AIR SF)";
				case 5: division = " (ARM SF)";
				case 6: division = " (INF)";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, division, GetPlayerNameEx(playerid), params);
			SendRadioMessage(11, COLOR_NG, string);
		}
	case 12:
		{
			switch(PlayerInfo[playerid][pRank])
			{
			     	case 1: rank = "Associate";
				    case 2: rank = "Soldier";
				    case 3: rank = "Captain";
			        case 4: rank = "Street Boss";
				    case 5: rank = "UnderBoss";
				    case 6: rank = "the Boss";
                    default: rank = "Associate";
			}
		    switch(PlayerInfo[playerid][pDivision])
			{
			    case 1: division = "Civil";
			    case 2: division = "AF";
			    case 3: division = "ES";
			    case 4: division = "DC";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, division, GetPlayerNameEx(playerid), params);
			SendRadioMessage(12, COLOR_TR, string);
		}
	case 13:
		{
			switch(PlayerInfo[playerid][pRank])
			{
                case 0: rank = "Ensign";
				case 1: rank = "Agent";
				case 2: rank = "Elite Marksman";
				case 3: rank = "Special Agent";
				case 4: rank = "Lead Agent";
				case 5: rank = "Section Chief";
				case 6: rank = "Director";
				default: rank = "Intern";
			}
			switch(PlayerInfo[playerid][pDivision])
			{
			    default: division = "";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, division, GetPlayerNameEx(playerid), params);
			SendRadioMessage(13, COLOR_CIA, string);
		}
	case 14:
		{
			switch(PlayerInfo[playerid][pRank])
			{
			    case 0: rank = "Employee";
				case 1: rank = "Trainee";
				case 2: rank = "Soldier";
				case 3: rank = "Specialist";
				case 4: rank = "Captain";
				case 5: rank = "Colonel";
				case 6: rank = "COO";
				case 7: rank = "CEO";
				default: rank = "Employee";
			}
			switch(PlayerInfo[playerid][pDivision])
			{
			    default: division = "";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, division, GetPlayerNameEx(playerid), params);
			SendRadioMessage(13, COLOR_VBROTHERS, string);
		}
	default:
		{
			SendClientMessageEx(playerid,COLOR_GRAD2,"You're not in a faction.");
			return 1;
		}
	}
	format(string, sizeof(string), "(radio) %s",params);
	SetPlayerChatBubble(playerid,string,COLOR_WHITE,15.0,5000);
	return 1;
}
Not that hard.
sampplayer12 is offline   Reply With Quote
Old 06/08/2012, 11:15 PM   #3
RLGaming
Huge Clucker
 
Join Date: Dec 2011
Posts: 358
Reputation: 27
Default Re: /tazer and /r help

Not that hard?

You copied that from the NGRP Script so think again.

Anyone that's not retard can help me?
RLGaming is offline   Reply With Quote
Old 06/08/2012, 11:20 PM   #4
you10
Little Clucker
 
Join Date: Jul 2011
Location: England, United Kingdom
Posts: 32
Reputation: 2
Default Re: /tazer and /r help

For the /r command, in the format() change sizeof(sendingname) to sizeof(string)
__________________
you10 is offline   Reply With Quote
Old 06/08/2012, 11:46 PM   #5
RLGaming
Huge Clucker
 
Join Date: Dec 2011
Posts: 358
Reputation: 27
Default Re: /tazer and /r help

That didn't fix it

Also my /arrest cmd:
CMD:arrest(playerid, params[])
{
new sendingname[MAX_PLAYER_NAME], string[160];
new rank = PlayerInfo[playerid][pLSPD];
if(rank < 1) return SCM(playerid, COLOR_GREY, "You are not authorized to use this command.");
{
if(IsPlayerInRangeOfPoint(playerid, 3.0,1525.3658,-1677.8115,5.8906)) return SCM(playerid, COLOR_LIGHTBLUE, "You are not at an arrest point.");
{
new giveplayerid;
if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /arrest [playerid]");

if(IsPlayerConnected(giveplayerid))
{
PlayerInfo[giveplayerid][pArrests]++;
SendClientMessage(playerid, COLOR_YELLOW, "You succesfully arrested the suspect, you were awarded $5000 for your hard work.");
SetPlayerPos(giveplayerid, 227.6157,110.7703,999.0156);
SetPlayerInterior(giveplayerid, 10);
SendClientMessage(giveplayerid, COLOR_BLUE, "You were arrested, you are now in jail.");
GivePlayerCash(playerid, 5000);
format(string, sizeof(sendingname),"*%s has arrested %s.",sendingname, params);
SendLSPDMessage(COLOR_LIGHTBLUE, string);
}
}
return 1;
}
}

How can I make it so you must be at the point since I can arrest anyone anywhere
RLGaming is offline   Reply With Quote
Old 07/08/2012, 12:44 AM   #6
=WoR=G4M3Ov3r
High-roller
 
Join Date: Nov 2010
Location: www.Ambrosia-Servers.com
Posts: 1,858
Reputation: 326
Default Re: /tazer and /r help

Quote:
Originally Posted by sampplayer12 View Post
Code:
CMD:tazer(playerid, params[])
{
	if(gTeam[playerid] == 2 || IsACop(playerid) || (PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pDivision] == 2) || (PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pRank] >= 5) || (PlayerInfo[playerid][pMember] == 9 && PlayerInfo[playerid][pDivision] == 1))
	{
		new string[128];
		if(PlayerInfo[playerid][pConnectTime] < 0 || PlayerInfo[playerid][pWRestricted] > 0) return SendClientMessageEx(playerid, COLOR_GRAD2, "You cannot use this as you are currently restricted from possessing weapons!");

		if(IsPlayerInAnyVehicle(playerid))
		{
			SendClientMessageEx(playerid, COLOR_GREY, "You can't do this while you're in a vehicle.");
			return 1;
		}

		if(GetPVarInt(playerid, "IsInArena") >= 0)
		{
			SendClientMessageEx(playerid, COLOR_WHITE, "You can't do this right now, you are in a arena!");
			return 1;
		}
		if(GetPVarInt( playerid, "EventToken") != 0)
		{
			SendClientMessageEx(playerid, COLOR_GREY, "You can't use the tazer while you're in an event.");
			return 1;
		}
		if(PlayerCuffedTime[playerid] > 0)
		{
			SendClientMessageEx(playerid, COLOR_GREY, "You can't do this right now.");
			return 1;
		}
		if(GetPVarInt(playerid, "Injured") == 1)
		{
			SendClientMessageEx(playerid, COLOR_GREY, "You can't do this right now.");
			return 1;
		}

		if(PlayerInfo[playerid][pJailed] > 0)
		{
			SendClientMessageEx(playerid, COLOR_WHITE, "You cannot use this in jail/prison.");
			return 1;
		}
		if(PlayerCuffed[playerid] >= 1) {
			SendClientMessageEx(playerid, COLOR_WHITE, "You cannot use this while tazed/cuffed.");
			return 1;
		}

		if(pTazer[playerid] == 0)
		{
			pTazerReplace[playerid] = PlayerInfo[playerid][pGuns][2];
			if(PlayerInfo[playerid][pGuns][2] != 0) RemovePlayerWeapon(playerid, PlayerInfo[playerid][pGuns][2]);
			format(string, sizeof(string), "* %s unholsters their tazer.", GetPlayerNameEx(playerid));
			ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			GivePlayerValidWeapon(playerid, 23, 60000);
			pTazer[playerid] = 1;
		}
		else
		{
			RemovePlayerWeapon(playerid, 23);
			GivePlayerValidWeapon(playerid, pTazerReplace[playerid], 60000);
			format(string, sizeof(string), "* %s holsters their tazer.", GetPlayerNameEx(playerid));
			ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			pTazer[playerid] = 0;
		}
	}
	else
	{
		SendClientMessageEx(playerid, COLOR_GREY, "   You are not a Cop / FBI / Coastguard!");
		return 1;
	}
	return 1;
}



Code:
CMD:r(playerid, params[])
{
	new string[128];
	if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: (/r)adio [radio chat]");

	new rank[64], division[16];
	switch (PlayerInfo[playerid][pMember])
	case 1:
		{
			switch(PlayerInfo[playerid][pRank])
			{
			case 1: rank = "Officer";
			case 2: rank = "Detective";
			case 3: rank = "Sergeant";
			case 4: rank = "Lieutenant";
			case 5: rank = "Captain";
			case 6: rank = "Chief";
			default: rank = "Cadet";
			}
			switch(PlayerInfo[playerid][pDivision])
			{
			case 2: division = " (II)";
			case 3: division = " (FTO)";
			case 4: division = " (IA)";
			case 5: division = " (SWAT)";
			default: division = "";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, division, GetPlayerNameEx(playerid), params);
			SendRadioMessage(1, RADIO, string);
		}
	case 2:
		{
			switch(PlayerInfo[playerid][pRank])
			{
			case 1: rank = "Staff";
			case 2: rank = "Agent";
			case 3: rank = "Senior Agent";
			case 4: rank = "Special Agent";
			case 5: rank = "Assistant Director";
			case 6: rank = "Director";
			default: rank = "Intern";
			}
			switch(PlayerInfo[playerid][pDivision])
			{
			case 2: division = " (GU)";
			case 3: division = " (FAN)";
			case 4: division = " (CID)";
			case 5: division = " (IA)";
			case 6: division = " (NSB)";
			default: division = "";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, division, GetPlayerNameEx(playerid), params);
			SendRadioMessage(2, RADIO, string);
		}
	case 3:
		{
			switch(PlayerInfo[playerid][pRank])
			{
				case 1: rank = "Trainee";
				case 2: rank = "Operator";
				case 3: rank = "Security";
				case 4: rank = "Foreman";
				case 5: rank = "Supervisor";
				case 6: rank = "Director";
				default: rank = "Intern";
			}
			switch(PlayerInfo[playerid][pDivision])
			{
			    case 1: division = " (HR)";
				case 2: division = " (ERT)";
				case 3: division = " (IA)";
				case 4: division = " (SO)";
				default: division = "";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, division, GetPlayerNameEx(playerid), params);
			SendRadioMessage(3, RADIO, string);
		}
		case 4:
		{
			switch(PlayerInfo[playerid][pRank])
			{
				case 1: rank = "EMT Intermediate";
				case 2: rank = "EMT Paramedic";
				case 3: rank = "Lieutenant";
				case 4: rank = "Captain";
				case 5: rank = "Deputy Chief";
				case 6: rank = "Chief";
				default: rank = "EMT Basic";
			}
			switch(PlayerInfo[playerid][pDivision])
			{
			    case 1: division = " (FD)";
				case 2: division = " (LF)";
				case 3: division = " (T&R)";
				default: division = "";
			}

			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, division, GetPlayerNameEx(playerid), params);
			SendRadioMessage(4, TEAM_CYAN_COLOR, string);
		}
	case 5:
		{
			switch(PlayerInfo[playerid][pRank])
			{
			case 1: rank = "Clerk of Court";
			case 2: rank = "District Attorney";
			case 3: rank = "District Judge";
			case 4: rank = "Appellate Judge";
			case 5: rank = "Associate Justice of the Supreme Court";
			case 6: rank = "Chief Justice of the Supreme Court";
			default: rank = "Clerk of Court";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, GetPlayerNameEx(playerid), params);
			SendRadioMessage(5, RADIO, string);
		}
	case 6:
		{
			switch(PlayerInfo[playerid][pRank])
			{
				    case 1: rank = "Body Guard";
			     	case 2: rank = "Driver";
				    case 3: rank = "Secretary";
				    case 4: rank = "Secret Agent";
			    	case 5: rank = "Chief of Staff";
				    case 6: rank = "Governor";
				    default: rank = "Cabinet";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, GetPlayerNameEx(playerid), params);
			SendRadioMessage(6, RADIO, string);
		}
	case 7:
		{
			switch(PlayerInfo[playerid][pRank])
			{
            case 1: rank = "Corporal";
			case 2: rank = "Sergeant";
			case 3: rank = "Lieutenant";
			case 4: rank = "Captain";
			case 5: rank = "UnderSheriff";
			case 6: rank = "Sheriff";
			default: rank = "Deputy";
			}
			switch(PlayerInfo[playerid][pDivision])
			{
			case 2: division = " (TOWING)";
			case 3: division = " (SCU)";
			case 4: division = " (SWAT)";
			case 5: division = " (FTO)";
			default: division = "";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, division, GetPlayerNameEx(playerid), params);
			SendRadioMessage(7, RADIO, string);
		}
	case 9:
		{
			switch(PlayerInfo[playerid][pRank])
			{
				case 1: rank = "Local Reporter";
				case 2: rank = "Local Editor";
				case 3: rank = "Network Anchor";
				case 4: rank = "Network Editor";
				case 5: rank = "Asst. Network Producer";
				case 6: rank = "Network Producer";
				default: rank = "Intern";
			}
			switch(PlayerInfo[playerid][pDivision])
			{
			    case 1: division = " (Security)";
			    case 2: division = " (IA)";
			    case 3: division = " (TS)";
			    case 4: division = " (TnR)";
			    default: division = "";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, division, GetPlayerNameEx(playerid), params);
			SendRadioMessage(9, TEAM_NEWS_COLOR, string);
		}
	case 11:
		{
			switch(PlayerInfo[playerid][pRank])
			{
				case 0: rank = "Private";
 				case 1: rank = "Corporal";
 				case 2: rank = "Sergeant";
 				case 3: rank = "Lieutenant";
 				case 4: rank = "Captain";
 				case 5: rank = "Major";
 				case 6: rank = "General";
				default: rank = "Private";
			}
			switch(PlayerInfo[playerid][pDivision])
			{
				case 1: division = " (AIR)";
			    case 2: division = " (ARM)";
			    case 3: division = " (VET)";
				case 4: division = " (AIR SF)";
				case 5: division = " (ARM SF)";
				case 6: division = " (INF)";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, division, GetPlayerNameEx(playerid), params);
			SendRadioMessage(11, COLOR_NG, string);
		}
	case 12:
		{
			switch(PlayerInfo[playerid][pRank])
			{
			     	case 1: rank = "Associate";
				    case 2: rank = "Soldier";
				    case 3: rank = "Captain";
			        case 4: rank = "Street Boss";
				    case 5: rank = "UnderBoss";
				    case 6: rank = "the Boss";
                    default: rank = "Associate";
			}
		    switch(PlayerInfo[playerid][pDivision])
			{
			    case 1: division = "Civil";
			    case 2: division = "AF";
			    case 3: division = "ES";
			    case 4: division = "DC";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, division, GetPlayerNameEx(playerid), params);
			SendRadioMessage(12, COLOR_TR, string);
		}
	case 13:
		{
			switch(PlayerInfo[playerid][pRank])
			{
                case 0: rank = "Ensign";
				case 1: rank = "Agent";
				case 2: rank = "Elite Marksman";
				case 3: rank = "Special Agent";
				case 4: rank = "Lead Agent";
				case 5: rank = "Section Chief";
				case 6: rank = "Director";
				default: rank = "Intern";
			}
			switch(PlayerInfo[playerid][pDivision])
			{
			    default: division = "";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, division, GetPlayerNameEx(playerid), params);
			SendRadioMessage(13, COLOR_CIA, string);
		}
	case 14:
		{
			switch(PlayerInfo[playerid][pRank])
			{
			    case 0: rank = "Employee";
				case 1: rank = "Trainee";
				case 2: rank = "Soldier";
				case 3: rank = "Specialist";
				case 4: rank = "Captain";
				case 5: rank = "Colonel";
				case 6: rank = "COO";
				case 7: rank = "CEO";
				default: rank = "Employee";
			}
			switch(PlayerInfo[playerid][pDivision])
			{
			    default: division = "";
			}
			format(string, sizeof(string), "** %s%s %s: %s, over.*Radio Beep*", rank, division, GetPlayerNameEx(playerid), params);
			SendRadioMessage(13, COLOR_VBROTHERS, string);
		}
	default:
		{
			SendClientMessageEx(playerid,COLOR_GRAD2,"You're not in a faction.");
			return 1;
		}
	}
	format(string, sizeof(string), "(radio) %s",params);
	SetPlayerChatBubble(playerid,string,COLOR_WHITE,15.0,5000);
	return 1;
}
Not that hard.
I wish I was as good as you.


Quote:
Originally Posted by RLGaming View Post
That didn't fix it

Also my /arrest cmd:
CMD:arrest(playerid, params[])
{
new sendingname[MAX_PLAYER_NAME], string[160];
new rank = PlayerInfo[playerid][pLSPD];
if(rank < 1) return SCM(playerid, COLOR_GREY, "You are not authorized to use this command.");
{
if(IsPlayerInRangeOfPoint(playerid, 3.0,1525.3658,-1677.8115,5.8906)) return SCM(playerid, COLOR_LIGHTBLUE, "You are not at an arrest point.");
{
new giveplayerid;
if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /arrest [playerid]");

if(IsPlayerConnected(giveplayerid))
{
PlayerInfo[giveplayerid][pArrests]++;
SendClientMessage(playerid, COLOR_YELLOW, "You succesfully arrested the suspect, you were awarded $5000 for your hard work.");
SetPlayerPos(giveplayerid, 227.6157,110.7703,999.0156);
SetPlayerInterior(giveplayerid, 10);
SendClientMessage(giveplayerid, COLOR_BLUE, "You were arrested, you are now in jail.");
GivePlayerCash(playerid, 5000);
format(string, sizeof(sendingname),"*%s has arrested %s.",sendingname, params);
SendLSPDMessage(COLOR_LIGHTBLUE, string);
}
}
return 1;
}
}

How can I make it so you must be at the point since I can arrest anyone anywhere

PHP Code:
CMD:arrest(playeridparams[])
{
    new 
sendingname[MAX_PLAYER_NAME], string[160];
    new 
rank PlayerInfo[playerid][pLSPD];
    if(
rank 1) return SCM(playeridCOLOR_GREY"You are not authorized to use this command.");
     {
        if(
IsPlayerInRangeOfPoint(playerid3.0,1525.3658,-1677.8115,5.8906))
                {
                
SendClientMessage(playeridCOLOR_LIGHTBLUE"You are not at an arrest point.");
                return 
1;
        }

            new 
giveplayerid;
            if(
sscanf(params"u"giveplayerid)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /arrest [playerid]");

            if(
IsPlayerConnected(giveplayerid))
            {
            
PlayerInfo[giveplayerid][pArrests]++;
            
SendClientMessage(playeridCOLOR_YELLOW"You succesfully arrested the suspect, you were awarded $5000 for your hard work.");
            
SetPlayerPos(giveplayerid227.6157,110.7703,999.0156);
            
SetPlayerInterior(giveplayerid10);
            
SendClientMessage(giveplayeridCOLOR_BLUE"You were arrested, you are now in jail.");
            
GivePlayerCash(playerid5000);
             
format(stringsizeof(sendingname),"*%s has arrested %s.",sendingnameparams);
            
SendLSPDMessage(COLOR_LIGHTBLUEstring);
            }
            }
        return 
1;
    }

Should work, since you had an open bracket after
PHP Code:
if(IsPlayerInRangeOfPoint(playerid7.01525.3658,-1677.8115,5.8906)) return SCM(playeridCOLOR_LIGHTBLUE"You are not at an arrest point."); 
=WoR=G4M3Ov3r is offline   Reply With Quote
Old 08/08/2012, 11:31 PM   #7
sampplayer12
Big Clucker
 
sampplayer12's Avatar
 
Join Date: Jun 2012
Location: United States of America
Posts: 109
Reputation: 17
Default Re: /tazer and /r help

Like it or not.
__________________
Friends are like condoms, they protect you when things gets hard
sampplayer12 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Tazer FS swat365 Scripting Help 3 05/01/2012 04:39 PM
[HELP] Tazer joeri55 Help Archive 2 02/06/2011 01:40 AM
Tazer with a gun vection Help Archive 6 23/08/2010 11:45 PM
tazer TouR Help Archive 3 24/06/2010 07:21 PM
[HELP] Tazer Gun Karl115 Help Archive 21 20/06/2010 06:21 PM


All times are GMT. The time now is 07:35 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.