|
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 |
if (strcmp("/help", cmdtext, true, 10) == 0)
{
if(gTeam[playerid]== Team_Grove)
{
// bla bla bla..C
}
else
{
// bla bla bla
}
return 1;
}
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;
}
147) : warning 209: function "OnPlayerCommandText" should return a value
|
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;
}
Код:
147) : warning 209: function "OnPlayerCommandText" should return a value |