13.10.2014, 16:31
nice script.
Update #0002 • Every 4 minutes a random message is broadcasted, eg. "Weapon unlocks are available! The more kills you get the more weapons your able to gain, get killing!" • Administrators are now distinguished by a lazer attached onto there weapon. • Weaponry is now added, you now spawn with a knife and a colt 45. • Scoring system that assigns you with new weapon unlocks, such as when you reach a score of 5 you unlock and spawn with a desert eagle, instead of the glock. • Weapon skills set, so you cannot akimbo with weapons. • Brand new headshot system, if you shoot an infected player in the head, more health is declined than a regular shot.
error 025: function heading differs from prototype
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart) { if(GetPlayerTeam(playerid) == TEAM_INFECTED){SetPlayerTeam(damagedid,TEAM_INFECTED),SpawnPlayer(damagedid),SendClientMessage(playerid,COLOR_RED,#Infected. Spread the infection to the living.),infected[playerid] = true;} return 1; } public OnPlayerTakeDamage(playerid,issuerid,Float:amount,weaponid,bodypart) { new Float:health; GetPlayerHealth(playerid,health); if(bodypart == 9) {SetPlayerHealth(playerid, health-40);} // If takes damage to the head region else{SetPlayerHealth(playerid, health-25);} // If anywhere other than the head region return 1; }
How to fix errors?
Код:
error 025: function heading differs from prototype Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart) { if(GetPlayerTeam(playerid) == TEAM_INFECTED){SetPlayerTeam(damagedid,TEAM_INFECTED),SpawnPlayer(damagedid),SendClientMessage(playerid,COLOR_RED,#Infected. Spread the infection to the living.),infected[playerid] = true;} return 1; } public OnPlayerTakeDamage(playerid,issuerid,Float:amount,weaponid,bodypart) { new Float:health; GetPlayerHealth(playerid,health); if(bodypart == 9) {SetPlayerHealth(playerid, health-40);} // If takes damage to the head region else{SetPlayerHealth(playerid, health-25);} // If anywhere other than the head region return 1; } |
Update #0003 • Audio streams added for when a player is 'Infected' & when the round is over. • Script optimized and now loads faster after created efficient space where lines are merged. Audio updates; INFECTED (Click me) | GAME OVER (Click me)