03.06.2012, 12:37
Does anyone know how to make script that gives you score, armour and health after i kill other player? it would be cool in DM server
public OnPlayerDeath(playerid, killerid, reason)
{
new score;
score = GetPlayerScore(killerscore);
SetPlayerScore(killerid, score+10); //change 10 to whatever you like
new armour;
armour = GetPlayerArmour(playerid);
SetPlayerArmour(killerid, armour+10);
SetPlayerHealth(killerid, 100);
return 1;
}
pawn Код:
|
C:\Users\Windows7\Desktop\Test\gamemodes\test.pwn(117) : error 017: undefined symbol "killerscore" C:\Users\Windows7\Desktop\Test\gamemodes\test.pwn(120) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
public OnPlayerDeath(playerid, killerid, reason) { new score; score = GetPlayerScore(killerid); SetPlayerScore(killerid, score+10); //change 10 to whatever you like new armour; armour = GetPlayerArmour(playerid); SetPlayerArmour(killerid, armour+10); SetPlayerHealth(killerid, 100); return 1; }
Код:
public OnPlayerDeath(playerid, killerid, reason) { new score; score = GetPlayerScore(killerid); SetPlayerScore(killerid, score+10); //change 10 to whatever you like new armour; armour = GetPlayerArmour(playerid); SetPlayerArmour(killerid, armour+10); SetPlayerHealth(killerid, 100); return 1; } |
C:\Users\Windows7\Desktop\Test\gamemodes\test.pwn(120) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.
Код:
C:\Users\Windows7\Desktop\Test\gamemodes\test.pwn(117) : error 017: undefined symbol "killerscore" C:\Users\Windows7\Desktop\Test\gamemodes\test.pwn(120) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
public OnPlayerDeath(playerid, killerid, reason)
{
new score;
score = GetPlayerScore(killerid);
SetPlayerScore(killerid, score+10); //change 10 to whatever you like
new Float:killerarmour;
GetPlayerArmour(killerid, killerarmour);
SetPlayerArmour(killerid, killerarmour+10);
new Float:killerHP;
GetPlayerHealth(killerid, killerHP);
SetPlayerHealth(killerid, killerHP+10);
return 1;
}
Oh my bad, I wasn't paying attention to that, sorry
Change it to pawn Код:
|