Faction Command
#4

pawn Код:
// Put this inside the command
if(gteam[playerid] == Team_TEAMNAME){ // If you have gTeams put the teamname here.
// Action
}else{
SendClientMessage(playerid,0xDEEE20FF, "You are not authorized to use this command.");
return 1;
}

// Example
// TOP of your script
#define Team_Admin 0

// Under OnPlayerCmdText

if (strcmp(cmdtext, "/kill", true) == 0){
if(gteam[playerid] == Team_Admin){
SetPlayerHealth(playerid, 0);
}else{
SendClientMessage(playerid, 0xDEEE20FF, "You are not authorized to use this command");
return 1;
}} // Might have forgot one bracket ( }) so If It gives you an error when you try It, add another or remove one.
I'm not at home so I cannot try It.
Reply


Messages In This Thread
Faction Command - by TheNotorius - 16.12.2009, 03:14
Re: Faction Command - by TheNotorius - 16.12.2009, 07:57
Re: Faction Command - by Donny_k - 16.12.2009, 08:12
Re: Faction Command - by Mike Garber - 16.12.2009, 10:07

Forum Jump:


Users browsing this thread: 1 Guest(s)