#1

Hello guyz i need help....!!!!!
For Bug
when someone kills someone the deaths dont increase
PLease help
Reply
#2

Can you give your deaths variable? Something like:

pawn Код:
new Death[MAX_PLAYERS];
Reply
#3

i dont have that in my gm
Reply
#4

Show us OnPlayerDeath, perhaps.
Reply
#5

Код:
public OnPlayerDeath(playerid, killerid, reason)
{

        Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " ");
        Synching[playerid] = false;
      if(Captured[playerid][SNAKE] == 0 && IsPlayerCapturing[playerid][SNAKE] == 1)
        {
			LeavingSnakeFarm(playerid);
		}
		if(Captured[playerid][BAY] == 0 && IsPlayerCapturing[playerid][BAY] == 1)
        {
			LeavingBay(playerid);
		}
		if(Captured[playerid][BIG] == 0 && IsPlayerCapturing[playerid][BIG] == 1)
		{
			LeavingEar(playerid);
		}
		if(Captured[playerid][BRIDGE] == 0 && IsPlayerCapturing[playerid][BRIDGE] == 1)
		{
			LeavingBridge(playerid);
		}
		if(Captured[playerid][CITY] == 0 && IsPlayerCapturing[playerid][CITY] == 1)
		{
			LeavingCity(playerid);
		}
		if(Captured[playerid][CLUCKIN] == 0 && IsPlayerCapturing[playerid][CLUCKIN] == 1)
		{
			LeavingCluckin(playerid);
		}
		if(Captured[playerid][ARMY] == 0 && IsPlayerCapturing[playerid][ARMY] == 1)
		{
			LeavingArmy(playerid);
		}
		if(Captured[playerid][PETROL] == 0 && IsPlayerCapturing[playerid][PETROL] == 1)
		{
			LeavingPetrol(playerid);
		}
		if(Captured[playerid][OIL] == 0 && IsPlayerCapturing[playerid][OIL] == 1)
		{
			LeavingOil(playerid);
		}
		if(Captured[playerid][DESERT] == 0 && IsPlayerCapturing[playerid][DESERT] == 1)
		{
			LeavingDesert(playerid);
		}
		if(Captured[playerid][QUARRY] == 0 && IsPlayerCapturing[playerid][QUARRY] == 1)
		{
			LeavingQuarry(playerid);
		}
		if(Captured[playerid][GUEST] == 0 && IsPlayerCapturing[playerid][GUEST] == 1)
		{
			LeavingGuest(playerid);
		}
		if(Captured[playerid][EAR] == 0 && IsPlayerCapturing[playerid][EAR] == 1)
		{
			LeavingEar(playerid);
		}
Reply
#6

Well Trollerz. At the top of script add:

pawn Код:
new Deaths[MAX_PLAYERS]; // Variable for Deaths
Under OnPlayerDeath add:

pawn Код:
Deaths[playerid]++; // Will increase deaths for that player
A command wich showin' Deaths.

pawn Код:
CMD:mydeaths(playerid, params[])
{
    new string[50];
    format(string, sizeof(string), "You curentlly have %d Deaths", Deaths);
    SendClientMessage(playerid, -1, string);
    return 1;
}
Reply
#7

C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(375) : error 021: symbol already defined: "Deaths"
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(6590) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(7302) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(15921) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(16550) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(20022) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(20022) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(20025) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(20176) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(20179) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(20181) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(20194) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(22041) : error 033: array must be indexed (variable "Deaths")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


13 Errors.
Reply
#8

Quote:
Originally Posted by HY
Посмотреть сообщение
Well Trollerz. At the top of script add:
pawn Код:
CMD:mydeaths(playerid, params[])
{
    new string[50];
    format(string, sizeof(string), "You curentlly have %d Deaths", Deaths);
    SendClientMessage(playerid, -1, string);
    return 1;
}
A small mistake here:
Quote:
Originally Posted by HY
pawn Код:
format(string, sizeof(string), "You curentlly have %d Deaths", Deaths);
To correct that;
pawn Код:
format(string, sizeof(string), "You curentlly have %d Deaths",Deaths[playerid]);
Reply
#9

Код:
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(375) : error 021: symbol already defined: "Deaths"
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(6590) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(7302) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(15922) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(16551) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(20023) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(20023) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(20026) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(20177) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(20180) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(20182) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(20195) : error 033: array must be indexed (variable "Deaths")
C:\Users\Administrator\Cookies\Desktop\samp materials\gamemodes\mwas.pwn(22042) : error 033: array must be indexed (variable "Deaths")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


13 Errors.
how can i fix this??
Reply
#10

pawn Код:
new Deaths[MAX_PLAYERS];
OnPlayerDeath

pawn Код:
Deaths[playerid] += 1;
pawn Код:
CMD:mydeaths(playerid, params[])
{
     new Str[128];
     format(Str, sizeof(Str), "You Die %d Times", Deaths[playerid]);
     SendClientMessage(playerid, 0xFFFF00FF, Str);
     return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)