Set class for next spawn
#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


Messages In This Thread
Set class for next spawn - by sanamalik400 - 14.09.2015, 23:24
Re: Set class for next spawn - by sanamalik400 - 14.09.2015, 23:40
Re: Set class for next spawn - by sanamalik400 - 14.09.2015, 23:58
AW: Set class for next spawn - by Kaliber - 15.09.2015, 00:38
Re: Set class for next spawn - by sanamalik400 - 15.09.2015, 00:43
AW: Set class for next spawn - by Kaliber - 15.09.2015, 00:44
Re: Set class for next spawn - by sanamalik400 - 15.09.2015, 00:45
AW: Set class for next spawn - by Kaliber - 15.09.2015, 00:49
Re: Set class for next spawn - by sanamalik400 - 15.09.2015, 00:51
AW: Set class for next spawn - by Kaliber - 15.09.2015, 00:52

Forum Jump:


Users browsing this thread: 1 Guest(s)