/callsign help
#1

Hello, i'm new to the function Attach3DTextLabeltoVehicle and i want to know how to go about making this command work, for my police system i am scripting i have a check to see if the player IsACop and i need to make a command that goes like

/callsign [Callsign] so for example if i was to go on duty as Romeo-6 i can do /callsign R6 and it creates the 3d text label on the right side of the bumper, i've never done this type of 3dtext label before and i'd like to know how to go abouts, i'm going to rep anyone who attempts to help.


(EX: )
Код:
IsACop(playerid)
{
	if(IsPlayerConnected(playerid))
	{
		new leader = PlayerInfo[playerid][pLeader];
		new member = PlayerInfo[playerid][pMember];
		if(member==1 || member==2 || member== 3 || member==7 || member==11 || member==13 || member==18 || member==19)
		{
			return 1;
		}
		else if(leader==1 || leader==2 || leader == 3 || leader==7 || leader==11 || leader==13 || leader==18 || leader==19)
		{
			return 1;
		}
 	}
	return 0;
}
that is my system to check to see if the player IsACop.
Reply
#2

That doesn't have anything to do with the /callsign command. But-.. I'll do something to the IsACop to be "Better".

Код:
if IsACop(playerid)
{
	if(IsPlayerConnected(playerid))
	{
		new leader = PlayerInfo[playerid][pLeader];
		new member = PlayerInfo[playerid][pMember];
		if(member==1 || member==2 || member== 3 || member==7 || member==11 || member==13 || member==18 || member==19)
		{
			return 1;
		}
		else if(leader==1 || leader==2 || leader == 3 || leader==7 || leader==11 || leader==13 || leader==18 || leader==19)
		{
			return 1;
		}
 	}
	return 0;
}
else
{
 	SendClientMessage(playerid, -1, "You are not a COP !");
 	return 1;
}
I still don't know why that so f***** up. Why don't u make a SIMPLE and USEFUL system ? Like.

Код:
if(pInfo[pMember] == 3)
{
 	// code here. 
 	return 1;
}
And you can define the first faction to be LSPD.

BTW, Give me the /callsign command
Reply
#3

Quote:
Originally Posted by SpikeSpigel
Посмотреть сообщение
That doesn't have anything to do with the /callsign command. But-.. I'll do something to the IsACop to be "Better".

Код:
if IsACop(playerid)
{
	if(IsPlayerConnected(playerid))
	{
		new leader = PlayerInfo[playerid][pLeader];
		new member = PlayerInfo[playerid][pMember];
		if(member==1 || member==2 || member== 3 || member==7 || member==11 || member==13 || member==18 || member==19)
		{
			return 1;
		}
		else if(leader==1 || leader==2 || leader == 3 || leader==7 || leader==11 || leader==13 || leader==18 || leader==19)
		{
			return 1;
		}
 	}
	return 0;
}
else
{
 	SendClientMessage(playerid, -1, "You are not a COP !");
 	return 1;
}
I still don't know why that so f***** up. Why don't u make a SIMPLE and USEFUL system ? Like.

Код:
if(pInfo[pMember] == 3)
{
 	// code here. 
 	return 1;
}
And you can define the first faction to be LSPD.

BTW, Give me the /callsign command
I havenet made the callsign command i put that function in the thread so whoever helps make the command to add the function to it to check if they're a cop and if they are let them use the command if they arent a cop it says you must be a cop to use this command.
Reply
#4

Create a 3D text label each time you use the command and then attach it to the vehicle by using these links below which will show you how to use those functions.

https://sampwiki.blast.hk/wiki/Create3DTextLabel
https://sampwiki.blast.hk/wiki/Attach3DTextLabelToVehicle

For the cop thing just use an 'if' statement for example if(IsACop(playerid))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)