help please - 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)
+--- Thread: help please (
/showthread.php?tid=337111)
help please -
XxX(cena)XxX - 25.04.2012
Hey guys please converted the code to ZCMD
pawn Код:
if(strcmp(cmd, "/makeleader", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Utiliza: /makeleader [playerid/PartOfName] [Number(1-19)]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 19 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "No hay esa facciуn"); return 1; }
if (PlayerInfo[playerid][pHmm] >= 5)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
new Fac[18];
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
if(level == 0) { PlayerInfo[para1][pChar] = 0; PlayerInfo[para1][pRank] = 0; Fac = "Sin facciуn"; }
else if(level == 1) { PlayerInfo[para1][pChar] = 283; PlayerInfo[para1][pRank] = 8; Fac = "LSPD";} //LSPD
else if(level == 3) { PlayerInfo[para1][pChar] = 287; PlayerInfo[para1][pRank] = 6; Fac = "Militares";} //Milicia
else if(level == 4) { PlayerInfo[para1][pChar] = 70; PlayerInfo[para1][pRank] = 6; Fac = "SAMUR";} //SAMUR
else if(level == 6) { PlayerInfo[para1][pRank] = 6; Fac = "Taxi";} //Taxi
else if(level == 7) { PlayerInfo[para1][pRank] = 6; Fac = "Mecбnicos";} //Mecas
else if(level == 8) { PlayerInfo[para1][pChar] = 165; PlayerInfo[para1][pRank] = 6; Fac = "Umbrella 7";} //U7
else if(level == 9) { PlayerInfo[para1][pChar] = 270; PlayerInfo[para1][pRank] = 6; Fac = "Groove Street";} //GS
else if(level == 10) { PlayerInfo[para1][pChar] = 292; PlayerInfo[para1][pRank] = 6; Fac = "La Hermandad";} //LH
else if(level == 11) { PlayerInfo[para1][pChar] = 110; PlayerInfo[para1][pRank] = 6; Fac = "Latin Kings";} //LK
else if(level == 12) { PlayerInfo[para1][pChar] = 113; PlayerInfo[para1][pRank] = 7; Fac = "Mafia Italiana";} //ITA
else if(level == 13) { PlayerInfo[para1][pChar] = 294; PlayerInfo[para1][pRank] = 6; Fac = "Mafia Yakuza";} //RUS
else if(level == 14) { PlayerInfo[para1][pChar] = 290; PlayerInfo[para1][pRank] = 7; Fac = "Mafia Rusa";} //RUS
else if(level == 15) { PlayerInfo[para1][pRank] = 5; Fac = "Licencieros";} //LIC
else if(level == 16) { PlayerInfo[para1][pChar] = 295; PlayerInfo[para1][pRank] = 2; Fac = "Gobierno";} //GOB
else if(level == 17) { PlayerInfo[para1][pRank] = 6; Fac = "CNN";} //CNN
else if(level == 18) { PlayerInfo[para1][pRank] = 8; Fac = "Banqueros";} //BANK
else if(level == 19) { PlayerInfo[para1][pChar] = 95; PlayerInfo[para1][pRank] = 6; Fac = "Narcotraficantes";} //NARCO
SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
format(string, sizeof(string), "(Admin:%s)Recibiste el liderato de la facciуn: %s", sendername, Fac);
SendClientMessage(para1, 0xFF7735FF, string);
format(string, sizeof(string), "Has dado a %s liderato de la facciуn: %s", giveplayer,Fac);
SendClientMessage(playerid, 0xFF7735FF, string);
}
}
}
else return Message(playerid, COLOR_GRAD1, "No autorizado!");
}
return 1;
}
Re: help please -
Squirrel - 25.04.2012
Search for it. Dont make us make commands for you. This is not request thread
Re: help please -
SuperViper - 25.04.2012
pawn Код:
COMMAND:makeleader(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new para1, level;
if(sscanf(params, "ud", para1, level)) return SendClientMessage(playerid, COLOR_GRAD2, "Utiliza: /makeleader [playerid/PartOfName] [Number(1-19)]");
if(level > 19 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "No hay esa facciуn"); return 1; }
if (PlayerInfo[playerid][pHmm] >= 5)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
new Fac[18];
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
if(level == 0) { PlayerInfo[para1][pChar] = 0; PlayerInfo[para1][pRank] = 0; Fac = "Sin facciуn"; }
else if(level == 1) { PlayerInfo[para1][pChar] = 283; PlayerInfo[para1][pRank] = 8; Fac = "LSPD";} //LSPD
else if(level == 3) { PlayerInfo[para1][pChar] = 287; PlayerInfo[para1][pRank] = 6; Fac = "Militares";} //Milicia
else if(level == 4) { PlayerInfo[para1][pChar] = 70; PlayerInfo[para1][pRank] = 6; Fac = "SAMUR";} //SAMUR
else if(level == 6) { PlayerInfo[para1][pRank] = 6; Fac = "Taxi";} //Taxi
else if(level == 7) { PlayerInfo[para1][pRank] = 6; Fac = "Mecбnicos";} //Mecas
else if(level == 8) { PlayerInfo[para1][pChar] = 165; PlayerInfo[para1][pRank] = 6; Fac = "Umbrella 7";} //U7
else if(level == 9) { PlayerInfo[para1][pChar] = 270; PlayerInfo[para1][pRank] = 6; Fac = "Groove Street";} //GS
else if(level == 10) { PlayerInfo[para1][pChar] = 292; PlayerInfo[para1][pRank] = 6; Fac = "La Hermandad";} //LH
else if(level == 11) { PlayerInfo[para1][pChar] = 110; PlayerInfo[para1][pRank] = 6; Fac = "Latin Kings";} //LK
else if(level == 12) { PlayerInfo[para1][pChar] = 113; PlayerInfo[para1][pRank] = 7; Fac = "Mafia Italiana";} //ITA
else if(level == 13) { PlayerInfo[para1][pChar] = 294; PlayerInfo[para1][pRank] = 6; Fac = "Mafia Yakuza";} //RUS
else if(level == 14) { PlayerInfo[para1][pChar] = 290; PlayerInfo[para1][pRank] = 7; Fac = "Mafia Rusa";} //RUS
else if(level == 15) { PlayerInfo[para1][pRank] = 5; Fac = "Licencieros";} //LIC
else if(level == 16) { PlayerInfo[para1][pChar] = 295; PlayerInfo[para1][pRank] = 2; Fac = "Gobierno";} //GOB
else if(level == 17) { PlayerInfo[para1][pRank] = 6; Fac = "CNN";} //CNN
else if(level == 18) { PlayerInfo[para1][pRank] = 8; Fac = "Banqueros";} //BANK
else if(level == 19) { PlayerInfo[para1][pChar] = 95; PlayerInfo[para1][pRank] = 6; Fac = "Narcotraficantes";} //NARCO
SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
format(string, sizeof(string), "(Admin:%s)Recibiste el liderato de la facciуn: %s", sendername, Fac);
SendClientMessage(para1, 0xFF7735FF, string);
format(string, sizeof(string), "Has dado a %s liderato de la facciуn: %s", giveplayer,Fac);
SendClientMessage(playerid, 0xFF7735FF, string);
}
}
}
else return Message(playerid, COLOR_GRAD1, "No autorizado!");
}
return 1;
}