Command Problem
#1

So I checked this command IG for bugs. When I use it for the first time, it works fine. I tried it again(i used a command to exit the DM zone), but now it doesn't. Much more, it does not let me chat, it does not let me use a command. Whenever I type in anything in the chatbox and enter it, nothing happens.

PHP код:
CMD:dm(playeridparams[])
{
    if(
isinarena[playerid] == 1) return 1;
    new 
id,str1[2];
    if(
sscanf(params"I"id)) return SendClientMessage(playerid0xFF000000"/dm [ID]");
    
valstr(str1id);
    if(
str1[1] == '\0' || str1[0] == '\0')
    {
        new 
str11[750],string[200];
        for(new 
i=0;i<3;i++)
        {
            
format(stringsizeof(string), "%d\t%s\t%d\t%d\n",MapArenas[i][MapID],MapArenas[i][MapName],mapplayers[i],MapArenas[i][MapCapacity]);
            
strcat(str11string);
        }
        
format(stringsizeof(string), "Map ID\tMap Name\tMap Players\tMap Capacity\n%s"str11);
        
ShowPlayerDialog(playeridDIALOG_AMAPSDIALOG_STYLE_TABLIST_HEADERS"Deathmatch Maps"
            
string"Enter""Cancel");
    }
    else
    {
        
isinarena[playerid] = 1;
        
//new rand = random(10);
        //if(rand == 1)
        //{
            
SetPlayerPos(playeridMapArenas[id][MapPosition][0], MapArenas[id][MapPosition][1], MapArenas[id][MapPosition][2]);
            
SetPlayerFacingAngle(playeridMapArenas[id][MapPosition][3]);
            
SetPlayerVirtualWorld(playeridARENA_VW);
            
SetPlayerInterior(playerid0);
            
SetPlayerHealth(playerid100);
            
SetPlayerArmour(playerid100);
            
GivePlayerWeapon(playeridMapArenas[id][MapWeapon][0], 100);
            
GivePlayerWeapon(playeridMapArenas[id][MapWeapon][1], 100);
            
GivePlayerWeapon(playeridMapArenas[id][MapWeapon][2], 100);
            
GivePlayerWeapon(playeridMapArenas[id][MapWeapon][3], 100);
            new 
string[70];
            
format(stringsizeof(string), "You have joined the %s deathmatch room"MapArenas[id][MapName]);
            
SendClientMessage(playerid0x00FF00FFstring);
            
mapplayers[id]++;
        
//}
    
}
    return 
1;

Lobby command

PHP код:
CMD:lobby(playerid)
{
    if(
shottimerleft[playerid] > 0)
    {
        
SendClientMessage(playerid0xFF0000FF"You have taken damage and have to wait the 10 seconds before exiting the area.");
    }
    else
    {
        
SetPlayerPos(playeridSPAWN_XSPAWN_YSPAWN_Z);
        
SetPlayerInterior(playeridSPAWN_INT);
        
SetPlayerVirtualWorld(playeridSPAWN_VW);
        
SetPlayerHealth(playerid999999);
        
SetPlayerArmour(playerid999999);
        
ResetPlayerWeapons(playerid);
        
isinarena[playerid] = 0;
        
killspree[playerid] = 0;
    }
    return 
1;

Reply


Messages In This Thread
Command Problem - by NealPeteros - 30.12.2017, 07:30
Re: Command Problem - by Ritzy2K - 30.12.2017, 07:36
Re: Command Problem - by NealPeteros - 30.12.2017, 07:40
Re: Command Problem - by Ritzy2K - 30.12.2017, 07:41
Re: Command Problem - by NealPeteros - 30.12.2017, 07:52
Re: Command Problem - by sheenidgs - 30.12.2017, 08:06
Re: Command Problem - by NealPeteros - 30.12.2017, 08:15
Re: Command Problem - by JaKe Elite - 30.12.2017, 08:32
Re: Command Problem - by NealPeteros - 30.12.2017, 08:51
Re: Command Problem - by JaKe Elite - 30.12.2017, 08:56

Forum Jump:


Users browsing this thread: 2 Guest(s)