Help command
#1

Help command


problem : hi all ; i want some help with that : i want to create a comand to change a player's team something like
/HUMAN(id)(reason ) or /Zombie(id)(reason )can someone can show me how can i o that
my GM has 5 team ...
thanks for helping me
Reply
#2

Use this Function..

Код:
ForceClassSelection(playerid);
??
Reply
#3

ForceClassSelection(playerid); is likй F4 it gust forcй thй playйr to choos antoйhr skin. i looking for who can i forcй a plyйr to changй thй tйam
Quote:

if(strcmp("/pm", cmd, true) == 0)
{
tmp = strtok(cmdtext,idx);

if(!strlen(tmp) || strlen(tmp) > 5) {
SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR," Usage:/team (id)");
return 1;
}

new id = strval(tmp);
gMessage = strrest(cmdtext,idx);

if(!strlen(gMessage)) {
SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR," Usage: /team (id)");
return 1;
}

if(!IsPlayerConnected(id)) {
SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"/team : Bad player ID");
}

if(playerid != id) {
GetPlayerName(id,iName,sizeof(iName));
GetPlayerName(playerid,pName,sizeof(pName));
SetPlayerHealth(id,0);
SetPlayerTeam(id, 2);

}
return 1;
}

Reply
#4

Post your change team function.
Reply
#5

ok this is tйam
Quote:

if(team[playerid] == 2)
{
SetPlayerTeam(playerid, 2);
SetPlayerArmour(playerid, 0);
ResetPlayerWeapons(playerid);
SetPlayerColor(playerid,ZRED);
GameTextForPlayer(playerid,"~r~Zombie ~b~ KEY_FIRE to bit human",10000,3);
SetPlayerHealth(playerid, 200);
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
GivePlayerWeapon(playerid,1,0);
}

Reply
#6

Use
pawn Код:
ForceClassSelection(playerid);
Actually, This is simple way to change the Team.
pawn Код:
if(strcmp(cmdtext, "/class",true)==0)
    {
    ForceClassSelection(playerid);
    SendClientMessage(playerid, 0x0000FFAA,"[CLASS]> You have been forced to the class selection");
    SetPlayerHealth(playerid, 0.00);
    return 1;
    }
Reply
#7

man ... if i use /class it will Chang MY class selection ... I'm looking for how can i change a target team
but thanks for trying to help me
Reply
#8

what ever i have found a solution
thanks anyway
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)