Ayuda no da el arma segun el rango... que ago?
#1

Hola tengo un problema con las armas de poli hoy puse un sistema de cuanto el poli ponga /armarse le de sus armas correspondientes al rango pero no me sirve no se porque yo uso /armarse y soy rango 1 y me da las armas del rango 5? no entiendo aqui abajo dejo el comando.

Код:
CMD:armarse(playerid, params[])
    {
    if(!IsACop(playerid) || Informacion[playerid][pDutyPolicia] != 1) return SendClientMessage(playerid, COLOR_GRAD2, "{00B5E8}Aviso: {FFFFFF}Solo policias con el uniforme tienen acceso a este comando.");
    if(Armado[playerid] > 0) return SendClientMessage(playerid, COLOR_GREEN,"Ya te pusistes tus armas si la quieres dejar Usa: {F4FA58}/dejar uniforme");
    {
    if(PlayerToPoint(5, playerid,767.9517,-64.0483,1000.6635)){
    {
    if(Informacion[playerid][pRank] == 1)
    SafeGivePlayerWeapon(playerid, 23, 5000);
    SafeGivePlayerWeapon(playerid, 25, 5000);
    }
    {
    if(Informacion[playerid][pRank] == 2)
    SafeGivePlayerWeapon(playerid, 24, 5000);
    SafeGivePlayerWeapon(playerid, 25, 5000);
    SafeGivePlayerWeapon(playerid, 29, 5000);
    SafeGivePlayerWeapon(playerid, 3, 1);
    }
    {
    if(Informacion[playerid][pRank] == 3)
    SafeGivePlayerWeapon(playerid, 24, 5000);
    SafeGivePlayerWeapon(playerid, 31, 5000);
    SafeGivePlayerWeapon(playerid, 29, 5000);
    SafeGivePlayerWeapon(playerid, 3, 1);
    }
    {
    if(Informacion[playerid][pRank] == 4)
    SafeGivePlayerWeapon(playerid, 31, 5000);
    SafeGivePlayerWeapon(playerid, 27, 5000);
    SafeGivePlayerWeapon(playerid, 29, 5000);
    SafeGivePlayerWeapon(playerid, 24, 5000);
    SafeGivePlayerWeapon(playerid, 3, 1);
    }
    {
    if(Informacion[playerid][pRank] == 5)
    SafeGivePlayerWeapon(playerid, 31, 5000);
    SafeGivePlayerWeapon(playerid, 27, 3000);
    SafeGivePlayerWeapon(playerid, 29, 5000);
    SafeGivePlayerWeapon(playerid, 24, 5000);
    SafeGivePlayerWeapon(playerid, 33, 5000);
    SafeGivePlayerWeapon(playerid, 3, 1);
    }
    new string[30 + (MAX_PLAYER_NAME * 2)];
    format(string, sizeof(string), "%s Agarra su armamento necesario", NombreJugador(playerid));
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    Armado[playerid] = 1;
    SendClientMessage(playerid, COLOR_WHITE, "{00B5E8}Informacion: {FFFFFF}Agarraste tu armamento recuerda que esas armas son solo para policias, si quieres dejar tus armas solo quitate el uniforme: {F4FA58}/dejar uniforme");
    }
    else SendClientMessage(playerid, COLOR_WHITE, "{F4FA58}Error: {FFFFFF}No estas en la armeria de policia.");
    }
    return 1;
    }
Como ago para areglar que de las armas por su rango y la de bien??
Reply
#2

Prueba:

pawn Код:
CMD:armarse(playerid, params[])
    {
    if(!IsACop(playerid) || Informacion[playerid][pDutyPolicia] != 1) return SendClientMessage(playerid, COLOR_GRAD2, "{00B5E8}Aviso: {FFFFFF}Solo policias con el uniforme tienen acceso a este comando.");
    if(Armado[playerid] > 0) return SendClientMessage(playerid, COLOR_GREEN,"Ya te pusistes tus armas si la quieres dejar Usa: {F4FA58}/dejar uniforme");
    if(PlayerToPoint(5, playerid,767.9517,-64.0483,1000.6635)){
    if(Informacion[playerid][pRank] == 1){
    SafeGivePlayerWeapon(playerid, 23, 5000);
    SafeGivePlayerWeapon(playerid, 25, 5000);
    }
    else if(Informacion[playerid][pRank] == 2){
    SafeGivePlayerWeapon(playerid, 24, 5000);
    SafeGivePlayerWeapon(playerid, 25, 5000);
    SafeGivePlayerWeapon(playerid, 29, 5000);
    SafeGivePlayerWeapon(playerid, 3, 1);
    }
    else if(Informacion[playerid][pRank] == 3){
    SafeGivePlayerWeapon(playerid, 24, 5000);
    SafeGivePlayerWeapon(playerid, 31, 5000);
    SafeGivePlayerWeapon(playerid, 29, 5000);
    SafeGivePlayerWeapon(playerid, 3, 1);
    }
    else if(Informacion[playerid][pRank] == 4){
    SafeGivePlayerWeapon(playerid, 31, 5000);
    SafeGivePlayerWeapon(playerid, 27, 5000);
    SafeGivePlayerWeapon(playerid, 29, 5000);
    SafeGivePlayerWeapon(playerid, 24, 5000);
    SafeGivePlayerWeapon(playerid, 3, 1);
    }
    else if(Informacion[playerid][pRank] == 5){
    SafeGivePlayerWeapon(playerid, 31, 5000);
    SafeGivePlayerWeapon(playerid, 27, 3000);
    SafeGivePlayerWeapon(playerid, 29, 5000);
    SafeGivePlayerWeapon(playerid, 24, 5000);
    SafeGivePlayerWeapon(playerid, 33, 5000);
    SafeGivePlayerWeapon(playerid, 3, 1);
    }
    new string[30 + (MAX_PLAYER_NAME * 2)];
    format(string, sizeof(string), "%s Agarra su armamento necesario", NombreJugador(playerid));
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    Armado[playerid] = 1;
    SendClientMessage(playerid, COLOR_WHITE, "{00B5E8}Informacion: {FFFFFF}Agarraste tu armamento recuerda que esas armas son solo para policias, si quieres dejar tus armas solo quitate el uniforme: {F4FA58}/dejar uniforme");
    } else {
    SendClientMessage(playerid, COLOR_WHITE, "No estбs en el vestuario.");
    }
    return 1;
    }
Reply
#3

Gracias solucionado xD
Reply
#4

Para eso estamos xdd
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)