SA-MP Forums Archive
bug - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: bug (/showthread.php?tid=638778)



bug - asri - 06.08.2017

when enter deathmatch the Interior is blank and then the player money
Ascending slightly when enter the room.

PHP код:
public OnPlayerSpawn(PID
PHP код:
if(InDM[PID] == true)
              {
                  switch (
DM[PID])
                {
                    case 
0shamal
                    
{
                            
GivePlayerWeapon(PID241000);
                            
SetPlayerHealth(PID99);
                            
SetPlayerArmour(PID99);
                            new 
spawn random(sizeof(DMZeroSpawns));
                            
SetPlayerPos(PIDDMZeroSpawns[spawn][0], DMZeroSpawns[spawn][1], DMZeroSpawns[spawn][2]);
                            
SetPlayerFacingAngle(PIDDMZeroSpawns[spawn][3]); //>> SetPlayerInterior
                            
SetPlayerVirtualWorld(PID1);
                            
SetPlayerInterior(playerid17);
                            
SetPlayerHealth(PID99);
                    }
                }
              } 
PHP код:
public OnPlayerDeath(PIDkilleridreason
PHP код:
if(InDM[PID] == true)
            {
              if(
anakko[PID] == 1)
              {
                    
anakko[PID] = 0;
                     if(
makko[PID] != INVALID_PLAYER_ID)
                    
TogglePlayerSpectating(PID1);
                    
PlayerSpectatePlayer(PIDkillerid);
                    
SendClientMessage(PIDSKYBLUE    "You have been killed, you are now spectating your killer.");
                    
SetTimerEx("EndDeathCam"10000false"i"playerid);
              }
              else
              {
                    
TogglePlayerSpectating(PID0);
                    
killstreak(PIDkillerid);
                    
DestroyDynamic3DTextLabel(wanted[killerid]);
                    return 
1;
              }
            } 
the dialog
PHP код:
Dialog:RandomDM(PIDresponselistiteminputtext[])
{
    new 
string[128], playerName[MAX_PLAYER_NAME];
    
GetPlayerName(PIDplayerNamesizeof(playerName));
    if (
response)
    {
        switch(
listitem// Check which option was chosen when they responded. We only have one for now. The next would be case 1, then case 2 and so on.
        
{
            case 
0:
            {
                    
InDM[PID] = true;
                    
DM[PID] = 0;
                    
SpawnPlayer(PID);
                    
PlayerTextDrawHide(PID,Textdraw0);
                    
PlayerTextDrawHide(PID,Textdraw1);
                    
PlayerTextDrawHide(PID,Textdraw2);
                    
PlayerTextDrawHide(PID,Textdraw3);
                    
SetPlayerInterior(playerid17);
                    
SetPlayerVirtualWorld(PID1);
            }
        }
        
format(stringsizeof(string), "{77B3D9}[DM Zones] {ffffff}%s(%i) has just entered {77B3D9}DM zone %i {ffffff}(/dm)"playerNamePIDDM[PID]);
        
scms(-1string);
        return 
1;  // ?? One you missed
    
}
    return 
0;

the command
PHP код:
CMD:dmlist(PIDparams[])
{
    
Dialog_Show(PIDRandomDMDIALOG_STYLE_LIST"DM Zones""DM 0 - Shamal""Enter""Cancel");
    return 
1;

another question,how make limit of room example if the maximum of room is 5 and other player cant go in


Re: bug - asri - 06.08.2017

update

the console show this

Quote:

[18:18:17] BUD::MultiGet returned:
money: 7450
kills: 0
deaths: 0
res: 0
[18:19:52] [debug] Run time error 4: "Array index out of bounds"
[18:19:52] [debug] Attempted to read/write array element at index 65535 in array of size 100
[18:19:52] [debug] AMX backtrace:
[18:19:52] [debug] #0 0003fcb0 in ?? (0, 65535) from a.amx
[18:19:52] [debug] #1 0003f52c in public WC_OnPlayerDeath (0, 65535, 55) from a.amx
[18:19:52] [debug] #2 00015f18 in ?? (0, 0, 65535, 55, 0, 0) from a.amx
[18:19:52] [debug] #3 0000196c in ?? (0, 0, -1082130432) from a.amx
[18:19:52] [debug] #4 00044eb0 in public cmd_kills (0, 6149920) from a.amx
[18:19:52] [debug] #5 native CallLocalFunction () from samp-server.exe
[18:19:52] [debug] #6 00000710 in public OnPlayerCommandText (0, 6149892) from a.amx




Re: bug - Misiur - 06.08.2017

Wrap this:
pawn Код:
killstreak(PID, killerid);
DestroyDynamic3DTextLabel(wanted[killerid]);
in check if killerid != invalid player id


Re: bug - asri - 06.08.2017

you do you mean

update:

the compiler show this

Quote:

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Header size: 9848 bytes
Code size: 356672 bytes
Data size: 6149596 bytes
Stack/heap size: 16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 6532500 bytes




Re: bug - asri - 07.08.2017

help


Re: bug - asri - 07.08.2017

help


Re: bug - asri - 08.08.2017

Help.when i type kill command it show the crash console


Re: bug - Dayrion - 08.08.2017

Quote:
Originally Posted by asri
Посмотреть сообщение
you do you mean

update:

the compiler show this
This is not related to the crash, I guess.
Show your logs please and have you updated your code since the Misiur's answer ?


Re: bug - asri - 08.08.2017

you mean onplayerdeath.yes i update the code


Re: bug - Dayrion - 08.08.2017

Let's show us your logs