public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
Kills[killerid] ++;
SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
}
Deaths[playerid] ++;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerInfo[playerid][pDeaths]++; // Replace with your variables
PlayerInfo[killerid][pKills]++; //Also Replace with your variables
SendDeathMessage(killerid, playerid, reason); //Sending the deaTH message to all
SetPlayerScore(killerid, GetPlayerScore(killerid, +1); //Setting the killers score
return 1;
}
D:\Pl0.3x [Euro] Server 8\pawno\systemadmin.pwn(103) : warning 201: redefinition of constant/macro (symbol "pInfo")
D:\Pl0.3x [Euro] Server 8\pawno\systemadmin.pwn(841) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
D:\Pl0.3x [Euro] Server 8\pawno\systemadmin.pwn(841) : warning 215: expression has no effect
D:\Pl0.3x [Euro] Server 8\pawno\systemadmin.pwn(841) : error 001: expected token: ";", but found "]"
D:\Pl0.3x [Euro] Server 8\pawno\systemadmin.pwn(841) : error 029: invalid expression, assumed zero
D:\Pl0.3x [Euro] Server 8\pawno\systemadmin.pwn(841) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
public OnPlayerDeath(playerid, killerid, reason)
{
pInfo[playerid][pDeaths]++;
pInfo[killerid][pKills]++;
SendDeathMessage(killerid, playerid, reason);
SetPlayerScore(killerid, GetPlayerScore(killerid, +1);
Deaths[playerid] ++;
InMinigame[playerid] = 0;
SendDeathMessage(killerid, playerid, reason);
return 1;
}
pInfo[playerid][pDeaths]++; // Replace with your variables
enum pInfo
{
ReadPms,
MaxPing,
ReadCmds,
ConnectMsg,
AutoLog,
sLocked,
sPass[129],
ScoreSaving,
ReporterName[MAX_PLAYER_NAME],
TargetName[MAX_PLAYER_NAME],
Reason[128],
H,
M,
S,
};
enum pInfo
{
Pass[129],
Ip[16],
Log,
TrustedPlayer,
Admin,
Hide,
Jail,
Freeze,
Mute,
MuteTime,
Pm,
hours,
minuteit,
secs,
TotalTime,
ConnectTime,
cage,
BlockPM,
Invisible,
AdminWhoBanIt[MAX_PLAYER_NAME],
Banned,
Float:X,
Float:Y,
Float:Z,
Float:Ang,
Int,
World,
SaveSkin,
SaveColor,
Question[129],
Answer[129],
UseSkin,
UseColor,
GainPoints,
God,
Warn,
Score,
Money,
Kills,
Deaths
};
pawn Код:
pawn Код:
|
public OnPlayerDeath(playerid, killerid, reason) { SendDeathMessage(killerid, playerid, reason); if(killerid != INVALID_PLAYER_ID) { SetPlayerScore(killerid, GetPlayerScore(killerid) + 1); GameTextForPlayer(killerid,"~w~+1 Score~R~~N~+1 kill~N~ ~g~+1000$", 5000, 1); GivePlayerMoney(killerid, 1000); SetPlayerScore(playerid, GetPlayerScore(playerid) - 1); } return 1; }
How do you have 900+ posts and still ask a questio that should be asked by a beginner?
|