public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid) { if(TazerAcceso[playerid] == 1) { if(GetPlayerWeapon(playerid) == 0) { ApplyAnimation(playerid,"KNIFE", "knife_3", 4.0, 0, 1, 1, 1, 1000); SetTimerEx("TimerClear",2000,false,"d",playerid); new victimid = GetClosestPlayer(playerid); new sendername[MAX_PLAYER_NAME]; if(IsPlayerConnected(victimid)) { if(GetDistanceBetweenPlayers(playerid,victimid) < 2) { GameTextForPlayer(victimid, "~r~Sokiran!", 2500, 3); new Float:health; GetPlayerHealth(victimid, health); SetPlayerHealth(victimid, health - 5.0); SetTimerEx("TimerFall",300,false,"d",victimid); TogglePlayerControllable(victimid, 0); SetTimerEx("Untaze", 8000, false, "i", victimid); } } } } return 1; }
new tazered_msg[64],tazering_msg[64],name_tazered[MAX_PLAYER_NAME+1]name_tazering[MAX_PLAYER_NAME+1]; GetPlayerName(playerid, name_tazering, sizeof(name_tazering)); GetPlayerName(damagedid, name_tazered, sizeof(name_tazered)); format(tazered_msg,sizeof(tazered_msg), "You have been tazered by %s(ID:%d)",name_tazering,playerid); format(tazering_msg,sizeof(tazering_msg), "You have tazered %s(ID:%d)" ,name_tazered , damagedid); SendClientMessage(playerid, -1 , tazering_msg); //CHANGE -1 TO THE COLOR YOU WANT SendClientMessage(damagedid, -1 , tazered_msg); //CHANGE -1 TO THE COLOR YOU WANT
Код:
new tazered_msg[64],tazering_msg[64],name_tazered[MAX_PLAYER_NAME+1]name_tazering[MAX_PLAYER_NAME+1]; GetPlayerName(playerid, name_tazering, sizeof(name_tazering)); GetPlayerName(damagedid, name_tazered, sizeof(name_tazered)); format(tazered_msg,sizeof(tazered_msg), "You have been tazered by %s(ID:%d)",name_tazering,playerid); format(tazering_msg,sizeof(tazering_msg), "You have tazered %s(ID:%d)" ,name_tazered , damagedid); SendClientMessage(playerid, -1 , tazering_msg); //CHANGE -1 TO THE COLOR YOU WANT SendClientMessage(damagedid, -1 , tazered_msg); //CHANGE -1 TO THE COLOR YOU WANT |
C:\Users\Komp\Desktop\ToXic RolePlay\gamemodes\CLRP.pwn(4368) : error 001: expected token: ";", but found "-identifier-" C:\Users\Komp\Desktop\ToXic RolePlay\gamemodes\CLRP.pwn(4368) : error 017: undefined symbol "name_tazering" C:\Users\Komp\Desktop\ToXic RolePlay\gamemodes\CLRP.pwn(4368) : warning 215: expression has no effect C:\Users\Komp\Desktop\ToXic RolePlay\gamemodes\CLRP.pwn(4368) : error 001: expected token: ";", but found "]" C:\Users\Komp\Desktop\ToXic RolePlay\gamemodes\CLRP.pwn(4368) : fatal error 107: too many error messages on one line