SA-MP Forums Archive
making /setteam - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: making /setteam (/showthread.php?tid=211560)



making /setteam - jaami - 15.01.2011

hey guys iam making /setteam in luxadmin system
dcmd_setteam(playerid,params[])
{
if(AccInfo[playerid][LoggedIn] == 1)
{
if(AccInfo[playerid][Level] >= 6 || IsPlayerAdmin(playerid))
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pTeam] = level;
gTeam[para1] = level;
SetPlayerWeapons(para1);
SetPlayerSpawn(para1);
ClearCrime(para1);
printf("AdmCmd: %s has switched %s to team %d.", sendername, giveplayer, level);
format(string, sizeof(string), " You have been switched to team %d by %s", level, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " You have switched %s to team %d.", giveplayer,level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}
here is what i put and i didnot get any error but y is it when iam in the server i cant do it?