Set class for next spawn
#1

is any one can make code for select a class for next spawn.means after selecting class.when player die,he spawn into the class which he selected .i m uploading zombie classes..i hope u will understand .plz edit this lines ,..sorry for bad english
+1 rep for Helper

PHP код:
case DIALOG_CLASS_2:
        {
            if(
response)
            {
                switch(
listitem)
                {
                    case 
0: if(pInfo[playerid][pXP] >= 0pInfo[playerid][pZombieClass] = 1,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pZombieClass] = STANDARDZOMBIE,setClass(playerid); else { SendXPError(playerid,0); }
                    case 
1: if(pInfo[playerid][pXP] >= 500pInfo[playerid][pZombieClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pZombieClass] = MUTATEDZOMBIE,setClass(playerid); else { SendXPError(playerid,500); }
                    case 
2: if(pInfo[playerid][pXP] >= 5000pInfo[playerid][pZombieClass] = 1,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pZombieClass] = FASTZOMBIE,setClass(playerid); else { SendXPError(playerid,5000); }
                    case 
3: if(pInfo[playerid][pXP] >= 10000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pZombieClass] = REAPERZOMBIE,setClass(playerid); else { SendXPError(playerid,10000); }
                    case 
4: if(pInfo[playerid][pXP] >= 18000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pZombieClass] = WITCHZOMBIE,setClass(playerid); else { SendXPError(playerid,18000); }
                    case 
5: if(pInfo[playerid][pXP] >= 20000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pZombieClass] = BOOMERZOMBIE,setClass(playerid); else { SendXPError(playerid,20000); }
                    case 
6: if(pInfo[playerid][pXP] >= 25000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pZombieClass] = STOMPERZOMBIE,setClass(playerid); else { SendXPError(playerid,25000); }
                    case 
7: if(pInfo[playerid][pXP] >= 35000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pZombieClass] = SCREAMERZOMBIE,setClass(playerid); else { SendXPError(playerid,35000); }
                    case 
8: if(pInfo[playerid][pXP] >= 65000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pZombieClass] = ADVANCEDMUTATED,setClass(playerid); else { SendXPError(playerid,65000); }
                    case 
9: if(pInfo[playerid][pXP] >= 70000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pZombieClass] = HEAVYSCREAMER,setClass(playerid); else { SendXPError(playerid,70000); }
                    case 
10: if(pInfo[playerid][pXP] >= 100000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pZombieClass] = FLESHEATER,setClass(playerid); else { SendXPError(playerid,100000); }
                    case 
11: if(pInfo[playerid][pXP] >= 150000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pZombieClass] = ADVANCEDWITCH,setClass(playerid); else { SendXPError(playerid,150000); }
                    case 
12: if(pInfo[playerid][pXP] >= 500000pInfo[playerid][pZombieClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pZombieClass] = ADVANCEDBOOMER,setClass(playerid); else { SendXPError(playerid,500000); }
                }
            }
        } 
Reply
#2

this code can change class for next spawn,can u change this code to my code i hope u understand
Quote:

case 2: {
if(GetPlayerScore(playerid)>=1500) {
if(cc[playerid]==1) {
cc[playerid]=0; SpawnPlayer(playerid); ZClass[playerid]=MUTANT;
if(Team[playerid]==ZOMBIE) { Zombiecount--; }
else if(Team[playerid]==HUMAN) { Humancount--; }
return true; }
ZClass[playerid]=MUTANT;
SendClientMessage(playerid,-1,""COL_WHITE"» "COL_YELLOW"Mutant Zombie has a special ability ( PRESS WALK_KEY TO INFECT HUMANS-BLIND VISION ).");
SendClientMessage(playerid,-1,""COL_WHITE"» "COL_YELLOW"You have selected "COL_WHITE"Mutnat Zombie Class "COL_YELLOW"for next spawn.");
} else SendClientMessage(playerid,-1,""COL_WHITE"» "COL_RED"You Don't Have Enough XP "COL_WHITE"( 1500 ).");

Reply
#3

PHP код:
Waiting for help..maybe no good scripters online now 
Reply
#4

Can you pls post your defines for STANDARDZOMBIE?

And the others pls?
Reply
#5

this will help u.i not understand what u want>>??
Quote:

if(team[playerid] == TEAM_ZOMBIE)
{
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,9,1);
SetPlayerArmour(playerid,0);
switch(pInfo[playerid][pZombieClass])
{
case STANDARDZOMBIE: SetPlayerSkin(playerid,181);
case MUTATEDZOMBIE: SetPlayerSkin(playerid,1);
case FASTZOMBIE:
{
SetPlayerSkin(playerid,162);

}
case REAPERZOMBIE: SetPlayerSkin(playerid,157);
case WITCHZOMBIE: SetPlayerSkin(playerid,196);
case BOOMERZOMBIE: SetPlayerSkin(playerid,264),SetPlayerHealth(player id,15);
case STOMPERZOMBIE: SetPlayerSkin(playerid,239);
case SCREAMERZOMBIE: SetPlayerSkin(playerid,212);
case FIREBREATHER:
{
switch(random(10))
{
case 0: SetPlayerSkin(playerid,152);
case 1: SetPlayerSkin(playerid,17;
case 2: SetPlayerSkin(playerid,237);
case 3: SetPlayerSkin(playerid,23;
case 4: SetPlayerSkin(playerid,246);
case 5: SetPlayerSkin(playerid,256);
case 6: SetPlayerSkin(playerid,257);
case 7: SetPlayerSkin(playerid,64);
case 8: SetPlayerSkin(playerid,63);
case 9: SetPlayerSkin(playerid,87);

}

}
case ADVANCEDMUTATED: SetPlayerSkin(playerid,15);
case HEAVYSCREAMER: SetPlayerSkin(playerid,134);
case FLESHEATER: SetPlayerSkin(playerid,213);
case ADVANCEDWITCH:
{
SetPlayerSkin(playerid,19;

}
case ADVANCEDBOOMER:
{
SetPlayerSkin(playerid,259);

}
case NEMESIS:
{
SetPlayerSkin(playerid,44);

SetPlayerHealth(playerid,200);
}
case ADVSTOMPER:
{
SetPlayerSkin(playerid,239);
}
case ADVSCREAMER:
{
SetPlayerSkin(playerid,132);
}
}
}
return 1;
}

Reply
#6

Look in your script for:

PHP код:
//For example:
#define STANDARDZOMBIE 0
//And the others must be defined too 
Reply
#7

or this??
Quote:

stock ConnectVars(playerid)
{
TextDrawShowForPlayer(playerid, ServerIntroOne[playerid]);
TextDrawShowForPlayer(playerid, ServerIntroTwo[playerid]);
pInfo[playerid][pHumanClass] = CIVILIAN;
pInfo[playerid][pZombieClass] = STANDARDZOMBIE;
team[playerid] = 0;
return 1;
}

Reply
#8

No

It must stand at top of your script

Look what i wrote
Reply
#9

PHP код:
#define STANDARDZOMBIE 2501
on dialog respons
case 0: if(pInfo[playerid][pXP] >= 0pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = STANDARDZOMBIE,setClass(playerid); else { SendXPError(playerid,0); }
and 
this onplayerkeystatechange
if(PRESSED(KEY_WALK))
    {
         if(
team[playerid] == TEAM_ZOMBIE)
        {
             if(
pInfo[playerid][pZombieClass] == STANDARDZOMBIE)
               {
                new 
victimid GetClosestPlayer(playerid);
                if(
gettime() - Abilitys[playerid][InfectionNormal]) return GameTextForPlayer(playerid,"~b~ Still recovering",4000,5);
                {
                       if(
IsPlayerConnected(victimid))
                    {
                          switch(
GetPlayerSkin(victimid))
                        {
                            case 
NON_IMMUNE:
                            {
                                if(
GetDistanceBetweenPlayers(playerid,victimid) < 2.0)
                                {
                                    if(
pInfo[victimid][IsPlayerInfected] == 0)
                                    {
                                        if(
pInfo[victimid][pAdminDuty] == 0)
                                        {
                                            new 
zmstring[256];
                                            
InfectPlayerStandard(victimid);
                                            
format(zmstring,sizeof(zmstring), ""chat""COL_PINK" %s has been infected by %s",PlayerName(victimid),PlayerName(playerid));
                                            
SendClientMessageToAll(-1,zmstring);
                                            
GivePlayerXP(playerid,5);
                                            
Abilitys[playerid][InfectionNormal] = gettime();
                                        }
                                        else if(
pInfo[victimid][pAdminDuty] == 1)
                                        {
                                            
SendClientMessage(playerid,COLOR_RED,"That player can't be infected because is on admin duty!");
                                        }
                                    }
                                    else return 
SendClientMessage(playerid,-1,""chat" Player is already infected!");
                                }
                            }
                        }
                    }
                }
            }
         }
    }
stock ConnectVars(playerid)
{
    
TextDrawShowForPlayer(playeridServerIntroOne[playerid]);
    
TextDrawShowForPlayer(playeridServerIntroTwo[playerid]);
    
pInfo[playerid][pHumanClass] = CIVILIAN;
    
pInfo[playerid][pZombieClass] = STANDARDZOMBIE;
    
team[playerid] = 0;
    return 
1;
}
stock setclass
if(team[playerid] == TEAM_ZOMBIE)
    {
        
ResetPlayerWeapons(playerid);
        
GivePlayerWeapon(playerid,9,1);
        
SetPlayerArmour(playerid,0);
        switch(
pInfo[playerid][pZombieClass])
        {
            case 
STANDARDZOMBIESetPlayerSkin(playerid,181);
            case 
MUTATEDZOMBIESetPlayerSkin(playerid,1);
            case 
FASTZOMBIE:
            {
            
SetPlayerSkin(playerid,162);
          
            }
            case 
REAPERZOMBIESetPlayerSkin(playerid,157);
            case 
WITCHZOMBIESetPlayerSkin(playerid,196);
            case 
BOOMERZOMBIESetPlayerSkin(playerid,264),SetPlayerHealth(playerid,15);
            case 
STOMPERZOMBIESetPlayerSkin(playerid,239);
            case 
SCREAMERZOMBIESetPlayerSkin(playerid,212);
            case 
FIREBREATHER:
            {
            switch(
random(10))
                {
                    case 
0SetPlayerSkin(playerid,152);
                    case 
1SetPlayerSkin(playerid,178);
                    case 
2SetPlayerSkin(playerid,237);
                    case 
3SetPlayerSkin(playerid,238);
                    case 
4SetPlayerSkin(playerid,246);
                    case 
5SetPlayerSkin(playerid,256);
                    case 
6SetPlayerSkin(playerid,257);
                    case 
7SetPlayerSkin(playerid,64);
                    case 
8SetPlayerSkin(playerid,63);
                    case 
9SetPlayerSkin(playerid,87);
                }
            }
stock getclassname
if(team[playerid] == TEAM_ZOMBIE)
    {
        switch(
pInfo[playerid][pZombieClass])
        {
            case 
STANDARDZOMBIEclassname "Standard Zombie"
Reply
#10

Yes that is what i wanted:

PHP код:
#define STANDARDZOMBIE 2501 
This

And know the other defines pls
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)