29.07.2014, 19:45
I recently found out about the function "SendDeathMessageToPlayer" which sends a death message to an individual player. I decided to make a loop and send the entire kill feed to online admins so they can easily moderate DM etc.
I had the following error upon compiling my gamemode:
Line 223 is the line which has 'SendDeathMessageToPlayer'.
Код:
public OnPlayerDeath(playerid, killerid, reason) { new string[128]; if(killerid == INVALID_PLAYER_ID) return SpawnPlayer(playerid) && SendClientMessage(playerid,-1,"{AA3333}SERVER:{FFFFFF} Your killer has disconnected from the server, take a screenshot of this message if you wish to make a complaint."); { format(string,128,"{AA3333}SERVER:{FFFFFF} You were killed by %s, take a screenshot of this message if you wish to make a complaint.",RemoveUnderScore(killerid)); SendClientMessage(playerid,-1,string); SpawnPlayer(playerid); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pAdmin] > 1) { SendDeathMessageToPlayer(i,killerid,playerid,reason); } } } } return 1; }
Код:
C:\Users\Jack\Documents\SAMP Vinewood RP\Vinewood Roleplay\gamemodes\vrp.pwn(223) : error 017: undefined symbol "SendDeathMessageToPlayer" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.