3 questions.
#1

Question 1 : How to script gang chat's ?
Question 2 :How to get a login for your gang*
Question 3 :how to get your gang to pay you every now and then ?

my mistake.
Reply
#2

Answer 1: Use OnPlayerText(playerid, text[]) {} to find out if the first character is ! or @ or whatever you want the team chat character to be and if !/@ == true just send the text to that team wiki.sa-mp.com can hep with setting up teams

Answer 2 - 3: (these are the same question) just use a timer and when the timer is 0 just take the ammount of money of them and give it to you, keep in mind that each player on your team will cost 100$ (example) you will need a array to find out there teams.

Good luck
Reply
#3

Uhm,i have the same question,

i need sombody to tell me where to put the chat ect

like lay it down for me D:,

www.confused.com
Reply
#4

sorry my mistake question 2 changed.

can you like send me part of the code for the gang chat please ?

and the money system it's for a RP server and how i make /login for a gang ?
Reply
#5

Код:
Public OnPlayerCommandText(playerid, cmdtext)
{
	if (strcmp("/cop *password*", cmdtext, true, 10) == 0)
	{
	SetPlayerPos(playerid,248.5653,67.3170,1003.6406);
    SetPlayerColor(playerid, 0x0000BBAA);
    SetPlayerInterior(playerid, 6);
    SetPlayerSkin(playerid, 280);
	GivePlayerWeapon(playerid, 3, 1);
	GivePlayerWeapon(playerid, 24,500);
	GivePlayerWeapon(playerid, 41,500);
	GivePlayerMoney(playerid, 5000);
	SendClientMessage (playerid, 0x33AA33AA, "You are now a cop");
	new pName[MAX_PLAYER_NAME];
    new string[48];
    GetPlayerName(playerid, pName, sizeof(pName));
    format(string, sizeof(string), "%s is now a cop, watch out!.", pName);
    SendClientMessageToAll(0xAAAAAAAA, string);
	// Do something here
	return 1;
	}
Co-Ords are for Dillamore PD. Man i have same question for 1 and 3
Reply
#6

Quote:
Originally Posted by Dragonite
sorry my mistake question 2 changed.

can you like send me part of the code for the gang chat please ?

and the money system it's for a RP server and how i make /login for a gang ?
Look into dudb for the login.

pawn Код:
public OnPlayerText(playerid,text[])
{
   if(!strcmp(text[0],"!",true))//They typed ! as the first character (you can easily change it to whatever)
   {
      new TeamChat[128];
      format(TeamChat,sizeof(TeamChat),"TEAM CHAT: %s(%d) : %s",ReturnPlayerName(playerid),playerid,text);//Format the message to be sent
      //Idk if you are using gTeam or the native team functions so I will show both

      //Native team function
      new team = GetPlayerTeam(playerid);
      for(new i =0; i<MAX_PLAYERS; i++)
      {
         if(GetPlayerTeam(i) == team)
         {
            SendClientMessage(i,COLOR,TeamChat);
         }
      }
      //gTeam way
      for(new i =0; i<MAX_PLAYERS; i++)
      {
         if(GetPlayerTeam(i) == gTeam[playerid])
         {
            SendClientMessage(i,COLOR,TeamChat);
         }
      }
      //Just erase the one you're not using.
   }
}
Idk if that will work. You can try it.
Reply
#7

Where can i find a tutorial for stuf like this ?
Reply
#8

wiki.sa-mp.com

Good Luck
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)