Easy help.
#1

Hi, i need help please in this command. What i want is, when someone enters to the faction, they get automatically this command only them, the faction its " Team_Santana " .

[php]CMD:creararma(playerid, params[]){
if (Info[playerid][pJob] == 7 || Info[playerid][pJob2] == 7){
if(Info[playerid][pJailed] > 0) return SendClientMessageEx(playerid, COLOR_WHITE, "No puedes crear armas en Jail.");
if(Info[playerid][pEstado] == 0){
if(Team_Judicial(playerid) || Info[playerid][pFMember] < 255) // ONLY THEM ARE AVAILABLE TO USE
if (GetPVarInt(playerid, "ArmsTimer") > 0){
new string[128];
format(string, sizeof(string), "Tienes que esperar %d segundos despues de haber creado algъn arma.", GetPVarInt(playerid, "ArmsTimer"));
SendClientMessageEx(playerid,COLOR_GREY,string);
return 1;
}
else{
switch(Info[playerid][pArmsSkill]){
case 0 .. 49: SafeDialogEx(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "{00F70C}Seleccionar Arma", "Katana (150)\nPalo Billar(90)\nCaсa (90)\nBate baseball (90)\nPala (90)","Ok", "Cancelar");
case 50 .. 99: SafeDialogEx(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "{00F70C}Seleccionar Arma", "Katana (150)\nPalo Billar(90)\nCaсa (90)\nBate baseball (90)\nPala (90)\nPistola 9mm (300)","Ok", "Cancelar");
case 100 .. 199: SafeDialogEx(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "{00F70C}Seleccionar Arma", "Katana (150)\nPalo Billar(90)\nCaсa (90)\nBate baseball (90)\nPala (90)\nPistola 9mm (300)\nPistola silenciada (400)","Ok", "Cancelar");
case 200 .. 299: SafeDialogEx(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "{00F70C}Seleccionar Arma", "Katana (150)\nPalo Billar(90)\nCaсa (90)\nBate baseball (90)\nPala (90)\nPistola 9mm(300)\nPistola silenciada (400)\nEscopeta (450)","Ok", "Cancelar");
case 300 .. 399: SafeDialogEx(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "{00F70C}Seleccionar Arma", "Katana (150)\nPalo Billar(90)\nCaсa (90)\nBate baseball (90)\nPala (90)\nPistola 9mm (300)\nPistola silenciada (400)\nEscopeta (450)\nDesert Eagle (800)","Ok", "Cancelar");
case 400 .. 499: SafeDialogEx(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "{00F70C}Seleccionar Arma", "Katana (150)\nPalo Billar(90)\nCaсa (90)\nBate baseball (90)\nPala (90)\nPistola 9mm (300)\nPistola silenciada (400)\nEscopeta (450)\nDesert Eagle (800)\nMP5 (1200)","Ok", "Cancelar");
case 500 .. 599: SafeDialogEx(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "{00F70C}Seleccionar Arma", "Katana (150)\nPalo Billar(90)\nCaсa (90)\nBate baseball (90)\nPala (90)\nPistola 9mm (300)\nPistola silenciada (400)\nEscopeta (450)\nDesert Eagle (800)\nMP5 (1200)\nAK-47 (2000)","Ok", "Cancelar");
case 600 .. 700: SafeDialogEx(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "{00F70C}Seleccionar Arma", "Katana (150)\nPalo Billar(90)\nCaсa (90)\nBate baseball (90)\nPala (90)\nPistola 9mm (300)\nPistola silenciada (400)\nEscopeta (450)\nDesert Eagle (800)\nMP5 (1200)\nAK-47\nM4A1 (2000)","Ok", "Cancelar");
default: SafeDialogEx(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "{00F70C}Seleccionar Arma", "Katana (50)\nCaсa (90)\nPalo Billar(90)\nBate baseball (90)\nPala (90)\n9mm Pistol (300)\nPistola silenciada (400)\nEscopeta (450)\nDesert Eagle (800\nMP5 (1200)\nAK-47 (2000)\nM4A1 (2000)\nSniper (4000)\nSPAS12 (3000)","Ok", "Cancelar");
}
}
return 1;
}
else SendClientMessage(playerid, COLOR_WHITE, "No puedes hacer esto mientras estas tazeado, congelado o esposado.");
}
return 1;
}[ / php ]
Reply
#2

Hm, yeah this is very easy to read... Not.
Use [php] for your code [ / php ]
Reply
#3

done, but isn't working . If only the website put somewhere to paste it..
Reply
#4

When the player gets added:> Call:>
PHP код:
cmd_creararma(ID_OF_PLAYER_WHO_GOT_ADDED" "); 
This will call the command for him..

PS: ^ Totally based on what I understood from the question.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)