Need Help please [+REP]
#1

PHP код:
    if(team[playerid] == TEAM_HUMAN)
    {
                            new 
string[2500];
                            
strcat(string,"{008080}Civilian - Silenced Pistol,Shotgun - 0 XP\n{008080}Police Man - Deagle,Shotgun - 500 XP\n{008080}Medic -Shotgun,Silenced Pistol,Armour,Cure Infected - 1000 XP\n\
                            {008080}Scout - Sniper,Silenced Pistol - 1500 XP\n{008080}Heavy Medic - Deagle,Shotgun,Armour,Cure Infected - 5000 XP\n{008080}Farmer - Deagle,AK,County Rifle,Armour - 6000 XP\n"
);
                            
strcat(string,"{008080}Soldier - AK47,Deagle - 6500 XP\n{008080}Engineer - Silenced Pistol,Shotgun,Armour,Build Boxes - 7500 XP\n{008080}S.W.A.T - MP5,Deagle,Armour,Immunity - 15,000 XP\n\
                            {008080}Heavy Shotgun - Shotgun,Deagle,Armour,More shotgun damage - 20,000 XP\n{008080}Advanced Medic - M4,Deagle,Shotgun,Cure all - 25,000 XP\n"
);
                            
strcat(string,"{008080}Advanced Engineer - Deagle,M4,Armour,Build Boxes - 30,000 XP\n{008080}Experienced Engineer -Deagle,Shotgun,Armour - Build Ladders - 35,000 XP\n\
                            {008080}Federal Agent - M4,Deagle,Shotgun,Armour,Immunity - 50,000 XP\n{008080}Advanced Scout - Sniper,Deagle,High jump,Half Armour - 100,000 XP\n\
                            {008080}Kick Back - Silenced Pistol,Shotgun,MP5 - 400000 XP\n{008080}Doctor - Silenced Pistol - Heal,Cure,Shield Heal,Half Immunity - Rank 22\n"
);
                            
strcat(string,"{008080}Pimp - Dildo, deals 15 damage 15000 XP\n{008080}Heavy Soldier - Can Give 25 Armour Point - 150000\n");
                            
strcat(string,"{008080}Assassin - Katana, One Hit Kill, C4 - 300.000 XP\n{008080}Cowboy - 2 colt pistols, extra damage, armour, 250.000XP\n");
                            
strcat(string,"{008080}Trap Master - Combat Shotgun, AK, Can put traps - 200.000 XP\n{008080}FBI - M4, Deagle, Immunity from all, Shotgun, Mp5 - 200.000 XP\n");
                            
strcat(string,"{008080}Scientist - Silenced Pistol, Can cure zombies - 300.000 XP\n{008080}Shotgun Specialist - Shotgun +50 Damage - 450,000 XP.\n{008080}Experienced Scout - One shoot kill, Sniper, Silenced Pistol - 1000000xp\n");
                            
strcat(string,"{008080}Smoke Up - Deagle - MP5 - M4 - Flamer - Full Immunity - Rank 30 Required\n{008080}Boxer - Can Give Stomper - 31 Rank Required\n{008080}BomberMan - Having Rocket Launcher - 450000xp\n");
                            
strcat(string,"{008080}Mp5 Master - Extreme damage with Mp5 - 500000xp\n{008080}Ghost Rider - Can Burn Zombies - 600000xp\n{008080}Hey Buddy - Gives 70 Damage - 150000xp\n{008080}Advanced KickBack - Gives Extreme KickBack - 900000\n{008080}Tec Girl - Gives 75 damage with Tec|200hp - 900000\n{008080}Bulls Eye - Gives high damage|sawnoff - 27 rank needed\n");
                            
ShowPlayerDialog(playerid,DIALOG_CLASS_2,DIALOG_STYLE_LIST,"Class Selection (Human)",string,"Select","Close");
    }
    if(
team[playerid] == TEAM_ZOMBIE)
    {
                            new 
string[974];
                            
strcat(string,"{41A317}Standard Zombie - LALT Infect a player - 0 XP\n{41A317}Mutated Zombie - LALT Infect Drunk Vision - 500 XP\n{41A317}Fast Zombie - High Jump - 5,000 XP\n\
                            {41A317}Reaper Zombie - More damage with chainsaw - 10,000 XP\n{41A317}Witch Zombie - LALT 75 Damage - 18,000 XP\n"
);
                            
strcat(string,"{41A317}Boomer Zombie - Explodes on death and infect - 20,000 XP\n\
                            {41A317}Stomper Zombie - LALT Throw all around you - 25,000 XP\n{41A317}Screamer - LALT Drop everyone down - 35000 XP\n\
                            {41A317}Advanced Mutated - LALT Infect all around - 65,000 XP\n{41A317}Heavy Screamer - LALT Throw all +5hp - 70,000 XP\n"
);
                            
strcat(string,"{41A317}Flesh Eater - LALT Infect a player kills faster - 100,000 XP\n{41A317}Advanced Witch - LALT 99 Damage - 150,000 XP\n{41A317}Advanced Boomer - LALT Explode - 500,000 XP\n");
                            
strcat(string,"{41A317}Advanced Stomper - 150 HP , Stomps humans away - 200.000 XP\n");
                             
strcat(string,"{41A317}Fire Breather - Throws out flames burning everything - 350.000 XP\n{41A317}Advanced Screamer - LALT Throw all +10hp ||-10 Hp to human - 450,000 XP\n{41A317}Advanced Boomer - LALT Explode - 500,000 XP\n");
                            
strcat(string,"{41A317}Nemesis - Creates some paravane, has 200 HP, custom skinned\n{41A317}Zombie Medic - /zheal to heal zombies\n{41A317}SlenderMan - HighJump MoreDamage - 700000\n{41A317}Killer Zombie - Cant be kickback - 600000\n{41A317}Ghost Zombie - Invisible | Gives 40 Damage - 170000\n{41A317}Dark Sniper - Having Sniper|Can Infect - 700000 xp");
                            
ShowPlayerDialog(playerid,DIALOG_CLASS_3,DIALOG_STYLE_LIST,"Class Selection (Zombie)",string,"Select","Close");
    } 
PHP код:
        case DIALOG_CLASS_2:
        {
            if(
response)
            {
                if(
pInfo[playerid][SkinChanges] >= 1)
                {
                    switch(
listitem)
                    {
                        case 
0: if(pInfo[playerid][pXP] >= 0pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = CIVILIAN,setClass(playerid); else { SendXPError(playerid,0); }
                        case 
1: if(pInfo[playerid][pXP] >= 500pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = POLICEMAN,setClass(playerid); else { SendXPError(playerid,500); }
                        case 
2: if(pInfo[playerid][pXP] >= 1000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = MEDIC,setClass(playerid); else { SendXPError(playerid,1000); }
                        case 
3: if(pInfo[playerid][pXP] >= 1500pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = SCOUT,setClass(playerid); else { SendXPError(playerid,1500); }
                        case 
4: if(pInfo[playerid][pXP] >= 5000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = HEAVYMEDIC,setClass(playerid); else { SendXPError(playerid,5000); }
                        case 
5: if(pInfo[playerid][pXP] >= 6000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = FARMER,setClass(playerid); else { SendXPError(playerid,6000); }
                        case 
6: if(pInfo[playerid][pXP] >= 6500pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = SOLDIER,setClass(playerid); else { SendXPError(playerid,6500); }
                        case 
7: if(pInfo[playerid][pXP] >= 7500pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = ENGINEER,setClass(playerid); else { SendXPError(playerid,7500); }
                        case 
8: if(pInfo[playerid][pXP] >= 15000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = SWAT,setClass(playerid); else { SendXPError(playerid,10000); }
                        case 
9: if(pInfo[playerid][pXP] >= 20000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = HEAVYSHOTGUN,setClass(playerid); else { SendXPError(playerid,20000); }
                        case 
10: if(pInfo[playerid][pXP] >= 25000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = ADVANCEDMEDIC,setClass(playerid); else { SendXPError(playerid,25000); }
                        case 
11: if(pInfo[playerid][pXP] >= 30000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = ADVANCEDENGINEER,setClass(playerid); else { SendXPError(playerid,30000); }
                        case 
12: if(pInfo[playerid][pXP] >= 35000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = E_ENGINEER,setClass(playerid); else { SendXPError(playerid,35000); }
                        case 
13: if(pInfo[playerid][pXP] >= 50000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = FEDERALAGENT,setClass(playerid); else { SendXPError(playerid,50000); }
                        case 
14: if(pInfo[playerid][pXP] >= 100000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = ADVANCEDSCOUT,setClass(playerid); else { SendXPError(playerid,100000); }
                        case 
15: if(pInfo[playerid][pXP] >= 400000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = KICKBACK,setClass(playerid); else { SendXPError(playerid,400000); }
                        case 
16: if(pInfo[playerid][pRank] >= 22pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = DOCTOR,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need to be rank 22+ to use this"); }
                        case 
17: if(pInfo[playerid][pXP] >= 15000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = PIMP,setClass(playerid); else { SendXPError(playerid,15000); }
                        case 
18: if(pInfo[playerid][pXP] >= 75000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = WEAPONSDEALER,setClass(playerid); else { SendXPError(playerid,75000); }
                        case 
19: if(pInfo[playerid][pXP] >= 300000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = ASSASSIN,setClass(playerid); else { SendXPError(playerid,300000); }
                        case 
20: if(pInfo[playerid][pXP] >= 250000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = COWBOY,setClass(playerid); else { SendXPError(playerid,250000); }
                        case 
21: if(pInfo[playerid][pXP] >= 200000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = TRAPMASTER,setClass(playerid); else { SendXPError(playerid,200000); }
                        case 
22: if(pInfo[playerid][pXP] >= 200000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = FBI,setClass(playerid); else { SendXPError(playerid,200000); }
                        case 
23: if(pInfo[playerid][pXP] >= 300000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = SCIENTIST,setClass(playerid); else { SendXPError(playerid,300000); }
                        case 
24: if(pInfo[playerid][pXP] >= 450000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = SHOTGUNSPECIAL,setClass(playerid); else { SendXPError(playerid,450000); }
                        case 
25: if(pInfo[playerid][pXP] >= 1000000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = EXPERIENCEDSCOUT,setClass(playerid); else { SendXPError(playerid,1000000); }
                        case 
26: if(pInfo[playerid][pRank] >= 30pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = SMOKEUP,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need to be rank 30+ to use this"); }
                        case 
27: if(pInfo[playerid][pRank] >= 31pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = BOXER,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need to be rank 31+ to use this"); }
                        case 
28: if(pInfo[playerid][pXP] >= 450000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = BOMBER,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need 450000 xp to use this class!"); }
                        case 
29: if(pInfo[playerid][pXP] >= 500000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = MASTER,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need 500000 xp to use this class!"); }
                        case 
30: if(pInfo[playerid][pXP] >= 600000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = GHOST,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need 600000 xp to use this class!"); }
                        case 
31: if(pInfo[playerid][pXP] >= 150000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = BUDDY,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need 150000 xp to use this class!"); }
                        case 
32: if(pInfo[playerid][pXP] >= 800000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = AKICK,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need 800000 xp to use this class!"); }
                        case 
33: if(pInfo[playerid][pXP] >= 900000pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = TECG,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need 900000 xp to use this class!"); }
                        case 
34: if(pInfo[playerid][pRank] >= 27pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = BULL,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need to be rank 27+ to use this class!"); }
                    }
                }
                
//else return SendClientMessage(playerid,-1,""chat""COL_RED" You ran out of skin changes mate! What do you think you are? Shape Shifter?");
            
}
        }
        case 
DIALOG_CLASS_3:
        {
            if(
response)
            {
                switch(
listitem)
                {
                    case 
0: if(pInfo[playerid][pXP] >= 0pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = STANDARDZOMBIE,setClass(playerid); else { SendXPError(playerid,0); }
                    case 
1: if(pInfo[playerid][pXP] >= 500pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = MUTATEDZOMBIE,setClass(playerid); else { SendXPError(playerid,500); }
                    case 
2: if(pInfo[playerid][pXP] >= 5000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = FASTZOMBIE,setClass(playerid); else { SendXPError(playerid,5000); }
                    case 
3: if(pInfo[playerid][pXP] >= 10000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = REAPERZOMBIE,setClass(playerid); else { SendXPError(playerid,10000); }
                    case 
4: if(pInfo[playerid][pXP] >= 18000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = WITCHZOMBIE,setClass(playerid); else { SendXPError(playerid,18000); }
                    case 
5: if(pInfo[playerid][pXP] >= 20000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = BOOMERZOMBIE,setClass(playerid); else { SendXPError(playerid,20000); }
                    case 
6: if(pInfo[playerid][pXP] >= 25000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = STOMPERZOMBIE,setClass(playerid); else { SendXPError(playerid,25000); }
                    case 
7: if(pInfo[playerid][pXP] >= 35000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = SCREAMERZOMBIE,setClass(playerid); else { SendXPError(playerid,35000); }
                    case 
8: if(pInfo[playerid][pXP] >= 65000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = ADVANCEDMUTATED,setClass(playerid); else { SendXPError(playerid,65000); }
                    case 
9: if(pInfo[playerid][pXP] >= 70000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = HEAVYSCREAMER,setClass(playerid); else { SendXPError(playerid,70000); }
                    case 
10: if(pInfo[playerid][pXP] >= 100000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = FLESHEATER,setClass(playerid); else { SendXPError(playerid,100000); }
                    case 
11: if(pInfo[playerid][pXP] >= 150000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = ADVANCEDWITCH,setClass(playerid); else { SendXPError(playerid,150000); }
                    case 
12: if(pInfo[playerid][pXP] >= 500000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = ADVANCEDBOOMER,setClass(playerid); else { SendXPError(playerid,500000); }
                    case 
13: if(pInfo[playerid][pXP] >= 200000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = ADVSTOMPER,setClass(playerid); else { SendXPError(playerid,200000); }
                    case 
14: if(pInfo[playerid][pXP] >= 350000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = FIREBREATHER,setClass(playerid); else { SendXPError(playerid,350000); }
                    case 
15: if(pInfo[playerid][pXP] >= 400000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = ADVSCREAMER,setClass(playerid); else { SendXPError(playerid,400000); }
                    case 
16: if(pInfo[playerid][pXP] >= 500000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = ADVANCEDBOOMER,setClass(playerid); else { SendXPError(playerid,500000); }
                    case 
17: if(pInfo[playerid][pXP] >= 500000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = NEMESIS,setClass(playerid); else { SendXPError(playerid,500000); }
                    case 
18: if(pInfo[playerid][pXP] >= 550000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = HZOMBIE,setClass(playerid); else { SendXPError(playerid,550000); }
                    case 
19: if(pInfo[playerid][pXP] >= 700000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = SLENDER,setClass(playerid); else { SendXPError(playerid,700000); }
                    case 
20: if(pInfo[playerid][pXP] >= 600000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = KZOM,setClass(playerid); else { SendXPError(playerid,600000); }
                    case 
21: if(pInfo[playerid][pXP] >= 170000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = GZOM,setClass(playerid); else { SendXPError(playerid,170000); }
                    case 
22: if(pInfo[playerid][pXP] >= 700000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = DSNIPE,setClass(playerid); else { SendXPError(playerid,700000); }
                }
            }
        } 
Can to help mee to make if player dont have xp to get the skin show it with red color.
Reply
#2

Anyone ?
Reply
#3

w8 i am trying to help, that will make some big codes
Reply
#4

Ok do it ThANK YOU
Reply
#5

Taking the base of SendXPError(playerid, exp)
pawn Код:
stock SendXPError(playerid, exp)
{
     new string[64];
     format(string, sizeof(string), "You need %d exp to get this skin.", exp);
     SendClientMessage(playerid, COL_RED, string);
     return 1;
}
Reply
#6

I want to show it with color red on dialog.
Reply
#7

wait, do you want to show the skins dialog if the player doesn't have xp for it it shows red?
Reply
#8

Yes bro
Reply
#9

Ok, once readed your new message, you have to make an if before each strcat, for example:

pawn Код:
new string[2500];
     if(pInfo[playerid][pXP] >= 0) strcat(string,"{008080}Civilian - Silenced Pistol,Shotgun - 0 XP\n");
     else strcat(string,"{FF0000}Civilian - Silenced Pistol,Shotgun - 0 XP\n");
     ...
Reply
#10

Can you make all for mee i cant do ?

I WILL REP YOU IF YOU WILL HELP MEE
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)