public OnPlayerSpawn(PID)
if(InDM[PID] == true)
{
switch (DM[PID])
{
case 0: shamal
{
GivePlayerWeapon(PID, 24, 1000);
SetPlayerHealth(PID, 99);
SetPlayerArmour(PID, 99);
new spawn = random(sizeof(DMZeroSpawns));
SetPlayerPos(PID, DMZeroSpawns[spawn][0], DMZeroSpawns[spawn][1], DMZeroSpawns[spawn][2]);
SetPlayerFacingAngle(PID, DMZeroSpawns[spawn][3]); //>> SetPlayerInterior
SetPlayerVirtualWorld(PID, 1);
SetPlayerInterior(playerid, 17);
SetPlayerHealth(PID, 99);
}
}
}
public OnPlayerDeath(PID, killerid, reason)
if(InDM[PID] == true)
{
if(anakko[PID] == 1)
{
anakko[PID] = 0;
if(makko[PID] != INVALID_PLAYER_ID)
TogglePlayerSpectating(PID, 1);
PlayerSpectatePlayer(PID, killerid);
SendClientMessage(PID, SKYBLUE , "You have been killed, you are now spectating your killer.");
SetTimerEx("EndDeathCam", 10000, false, "i", playerid);
}
else
{
TogglePlayerSpectating(PID, 0);
killstreak(PID, killerid);
DestroyDynamic3DTextLabel(wanted[killerid]);
return 1;
}
}
Dialog:RandomDM(PID, response, listitem, inputtext[])
{
new string[128], playerName[MAX_PLAYER_NAME];
GetPlayerName(PID, playerName, sizeof(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(playerid, 17);
SetPlayerVirtualWorld(PID, 1);
}
}
format(string, sizeof(string), "{77B3D9}[DM Zones] {ffffff}%s(%i) has just entered {77B3D9}DM zone %i {ffffff}(/dm)", playerName, PID, DM[PID]);
scms(-1, string);
return 1; // ?? One you missed
}
return 0;
}
CMD:dmlist(PID, params[])
{
Dialog_Show(PID, RandomDM, DIALOG_STYLE_LIST, "DM Zones", "DM 0 - Shamal", "Enter", "Cancel");
return 1;
}
[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 |
killstreak(PID, killerid);
DestroyDynamic3DTextLabel(wanted[killerid]);
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 |