How do i add this?
#1

I'm trying to learn how to add teams from the sa-mp wiki.

I've followed everything correctly and its all fine. What i want to do now is, add certain commands for certain teams...How do i do that tho?


Heres my pastebin: http://pastebin.com/m38bc3b5c

On "OnPlayerCommandText" i want to add say...."/help" and it will display it only for 1 team how can i do that with what i have got so far in my pastebin?

Thanks for the help
Reply
#2

Quote:
Originally Posted by killdahobo99
I'm trying to learn how to add teams from the sa-mp wiki.

I've followed everything correctly and its all fine. What i want to do now is, add certain commands for certain teams...How do i do that tho?


Heres my pastebin: http://pastebin.com/m38bc3b5c

On "OnPlayerCommandText" i want to add say...."/help" and it will display it only for 1 team how can i do that with what i have got so far in my pastebin?

Thanks for the help
uhm..maybe /help
Код:
	if (strcmp("/help", cmdtext, true, 10) == 0)
	{
	 if(gTeam[playerid]== Team_Grove)
	 {
	 // bla bla bla..C
	 }
	 else
	 {
	 // bla bla bla
	 }
		return 1;
	}
Reply
#3

This is what i have


Код:
 if (strcmp(cmdtext, "/ahelp", true) == 0) // ----------GUNZ COMMAND JUST FOR ADMIN
	{
	if (gTeam[playerid] == TEAM_GROVE)
	{
	SendClientMessage(playerid, 0xFF0000AA, "Only GROVE are authorized to use this command!");
	return 1;
	}
	else
	SendClientMessage(playerid,COLOR_LIGHTBLUE, "A FEW ADMIN COMMANDS");
	return 1;
  }
and heres the error i get

Код:
147) : warning 209: function "OnPlayerCommandText" should return a value
Reply
#4

Quote:
Originally Posted by killdahobo99
This is what i have


Код:
 if (strcmp(cmdtext, "/ahelp", true) == 0) // ----------GUNZ COMMAND JUST FOR ADMIN
	{
	if (gTeam[playerid] == TEAM_GROVE)
	{
	SendClientMessage(playerid, 0xFF0000AA, "Only GROVE are authorized to use this command!");
	return 1;
	}
	else
	SendClientMessage(playerid,COLOR_LIGHTBLUE, "A FEW ADMIN COMMANDS");
	return 1;
  }
and heres the error i get

Код:
147) : warning 209: function "OnPlayerCommandText" should return a value
Add one more } at the end
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)