[HELP] Delete3DTextLabel Bad ...
#1

Quote:

if(strcmp(cmd, "/makeleader", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /makeleader [playerid/PartOfName] [Number(1-10)]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 11 || level < 0) { SendClientMessage(playerid, COLOR_GREY, " Dont go below number 0, or above number 11!"); return 1; }
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if(PlayerInfo[para1][pMember] > 0 || PlayerInfo[para1][pFMember] < 255)
{
SendClientMessage(playerid, COLOR_GREY, " That player is in a Faction / Family !");
return 1;
}
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
format(string, sizeof(string), " You have been promoted to Leader to your requested Faction by Admin %s", sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " You have given %s control to run Faction Number %d.", giveplayer,level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
if(level == 0) { PlayerInfo[para1][pChar] = 264; }
else if(level == 1) { PlayerInfo[para1][pChar] = 288; } //Police Force
else if(level == 2) { PlayerInfo[para1][pChar] = 286; } //FBI/ATF
else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //National Guard
else if(level == 4) { PlayerInfo[para1][pChar] = 228; } //Fire/Ambulance
else if(level == 5) { PlayerInfo[para1][pChar] = 293; } //Bloods
else if(level == 6) { PlayerInfo[para1][pChar] = 292; } //Crips
else if(level == 7) { PlayerInfo[para1][pChar] = 147; } //Mayor
else if(level == { PlayerInfo[para1][pChar] = 294; } //Hitmans
else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //News Reporters
else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taxi Cab Company
else if(level == 11) { PlayerInfo[para1][pChar] = 171; } //Driving/Flying School
PlayerInfo[para1][pRank] = 6;
SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
Delete3DTextLabel(label[para1]);
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}

Letters red
Changed to 0 and Text3d LevelOne not lost.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)