forward PlayerDeathMode(playerid); public PlayerDeathMode(playerid) { new string[128]; format(string, sizeof(string), "(( This player is bruitally wounded..\n/damages %s to check damages ))", playerid); new Text3D:deathlabel = Create3DTextLabel(string, COLOR_LIGHTRED, 0.0, 0.0, 0.0, 15.0, 0); Attach3DTextLabelToPlayer(deathlabel, playerid, 0.0, 0.0, 0.7); ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4.1, 0, 0, 0, 1, 0, 1); SetPlayerColor(playerid, TRANSPARENT_GREY); SendClientMessage(playerid, COLOR_LIGHTRED, "(( You are not bruitally wounded, you have 2 minutes to get help before you can acceptdeath. ))"); deathmodedeath[playerid] = SetTimerEx("PlayerDeathModeDEATH", 120000, false, "i", playerid); deathmodeaccept[playerid] = SetTimerEx("PlayerDeathModeACCEPT", 60000, false, "i", playerid); pDeathMode[playerid] = 1; cantacceptdeath[playerid] = 1; return 1; }
CMD:acceptdeath(playerid, params[]) { if(cantacceptdeath[playerid] == 1) return SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER:{FFFFFF} You must wait first.. ))"); SetPlayerPos(playerid, 1177.9880, -1323.7708, 15.0878); SendClientMessage(playerid, COLOR_LIGHTRED, "** You accepted your fate, you're medical bills come to $500"); GivePlayerMoney(playerid, -500); KillTimer(deathmodeaccept[playerid]); KillTimer(deathmodedeath[playerid]); return 1; }
new Text3D:deathlabel[MAX_PLAYERS] = {-1,...};//global
//In OnPlayerConnect
deathlabel[playerid] = -1;
forward PlayerDeathMode(playerid);
public PlayerDeathMode(playerid)
{
new string[128],name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof name);
format(string, sizeof(string), "(( This player is bruitally wounded..\n/damages %s to check damages ))", name);
deathlabel[playerid] = Create3DTextLabel(string, COLOR_LIGHTRED, 0.0, 0.0, 0.0, 15.0, 0);
Attach3DTextLabelToPlayer(deathlabel[playerid], playerid, 0.0, 0.0, 0.7);
ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4.1, 0, 0, 0, 1, 0, 1);
SetPlayerColor(playerid, TRANSPARENT_GREY);
SendClientMessage(playerid, COLOR_LIGHTRED, "(( You are not bruitally wounded, you have 2 minutes to get help before you can acceptdeath. ))");
deathmodedeath[playerid] = SetTimerEx("PlayerDeathModeDEATH", 120000, false, "i", playerid);
deathmodeaccept[playerid] = SetTimerEx("PlayerDeathModeACCEPT", 60000, false, "i", playerid);
pDeathMode[playerid] = 1;
cantacceptdeath[playerid] = 1;
return 1;
}
CMD:acceptdeath(playerid, params[])
{
if(cantacceptdeath[playerid] == 1) return SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER:{FFFFFF} You must wait first.. ))");
SetPlayerPos(playerid, 1177.9880, -1323.7708, 15.0878);
SendClientMessage(playerid, COLOR_LIGHTRED, "** You accepted your fate, you're medical bills come to $500");
GivePlayerMoney(playerid, -500);
KillTimer(deathmodeaccept[playerid]);
KillTimer(deathmodedeath[playerid]);
Delete3DTextLabel(deathlabel[playerid]);
deathlabel[playerid] = -1;
return 1;
}
C:\Users\Nathan\Desktop\Downtown Roleplay\gamemodes\core.pwn(171) : warning 213: tag mismatch C:\Users\Nathan\Desktop\Downtown Roleplay\gamemodes\core.pwn(434) : warning 213: tag mismatch C:\Users\Nathan\Desktop\Downtown Roleplay\gamemodes\core.pwn(4803) : warning 217: loose indentation C:\Users\Nathan\Desktop\Downtown Roleplay\gamemodes\core.pwn(4807) : warning 213: tag mismatch Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Warnings.
new Text3D:deathlabel[MAX_PLAYERS];//global
In OnPlayerConnect:
deathlabel[playerid] = 0;
Oh, sorry.
Write it in the following way: PHP код:
PHP код:
![]() |
C:\Users\Nathan\Desktop\Downtown Roleplay\gamemodes\core.pwn(4808) : warning 213: tag mismatch
new Text3D:deathlabel[MAX_PLAYERS] = {-1,...};//global
deathlabel[playerid] = Text3D:0;
C:\Users\Nathan\Desktop\Downtown Roleplay\gamemodes\core.pwn(170) : warning 213: tag mismatch
new Text3D:deathlabel[MAX_PLAYERS] = {-1,...};//global
new Text3D:deathlabel[MAX_PLAYERS] = {-1,...};//global
deathlabel[playerid] = Text3D:0;
new Text3D:deathlabel[MAX_PLAYERS];