24.08.2014, 01:57
(
Последний раз редактировалось ZionShark; 24.08.2014 в 02:59.
)
Hey there,I have a problem with a command on my gamemode,its /contratar which means to give a contract into a faction,anyway, every time I try to give someone a contract it says, " you are not the leader" and iv pretty much done everything but i just cant figure it out,could someone help me ? I would appreciate it a lot.
[Here is the code that I use]
[Here is the code that I use]
PHP код:
zcmd(contratar, playerid, params[]){
if(Pandilla_surenos(playerid) || Pandilla_groove(playerid) || Pandilla_ballas(playerid) || Team_nfs(playerid) || Team_Bomberos(playerid) || Mafia_yakuza(playerid) || Mafia_lcn(playerid) || Mafia_rusa(playerid) || Cartel_Medellin(playerid)){
new giveplayerid;
if(!sscanf(params, "d", giveplayerid)){
if(IsPlayerConnected(giveplayerid)){
if(ProxDetectorS(8.0, playerid, giveplayerid)){
if(giveplayerid == playerid) return SendClientMessageEx(playerid, COLOR_GRAD2, "ЎNo puedes invitarte ati mismo!"); //i cant invite myself
if(Info[giveplayerid][pFMember] < 255) return SendClientMessageEx(playerid, COLOR_GRAD2, "ЎNo puedes invitar a una persona que estб en una banda o familia!"); //i cant invite that person as he has family
if(Facturing[giveplayerid] > 0) return SendClientMessageEx(playerid, COLOR_GRAD2, "Este jugador estб en otra tarea, espera.");
if(Info[giveplayerid][pMember] > 0 || Info[giveplayerid][pLeader] > 0) return SendClientMessageEx(playerid, COLOR_GRAD2, "Este jugador ya tiene facciуn."); // this players already has a faction
new string[256];
switch(Info[playerid][pLeader]){
case 1: ReqF_Name[giveplayerid] = "Bomberos";
case 2: ReqF_Name[giveplayerid] = "La Cosa Nostra";
case 3: ReqF_Name[giveplayerid] = "Rusa";
case 4: ReqF_Name[giveplayerid] = "Yakuza";
case 5: ReqF_Name[giveplayerid] = "Sureсos"; //factions
case 6: ReqF_Name[giveplayerid] = "Groove";
case 7: ReqF_Name[giveplayerid] = "Ballas";
case 8: ReqF_Name[giveplayerid] = "Need For Speed";
case 9: ReqF_Name[giveplayerid] = "Cartel Medellin";
}
ReqF_Faction[giveplayerid] = Info[playerid][pLeader];
Facturing[giveplayerid] = 1;
format(string, sizeof(string), "\t\tContrato\n\n\t%s te ofrece un contrato en %s\n\tїQuieres aceptarlo y pertenecer a esta organizaciуn?", GetPlayerNameEx(playerid), ReqF_Name[giveplayerid]);
SafeDialogEx(giveplayerid, REQF_ACCEPT, DIALOG_STYLE_MSGBOX, "Contrato de Trabajo", string, "Aceptar", "Rechazar"); //acept reject
}else SendClientMessageEx(playerid, COLOR_GRAD2, "Jugador muy lejos."); // player too far
}else SendClientMessageEx(playerid, COLOR_GRAD2, "Jugador desconectado."); // player off line
}else SendClientMessageEx(playerid, COLOR_GRAD2, "* /contratar <jugador>"); // /contract
}else SendClientMessageEx(playerid, COLOR_GRAD2, "Usted no es lider de facciуn."); //you are not the leader
return 1;
}