help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help (
/showthread.php?tid=523312)
help -
ScripteRNaBEEL - 01.07.2014
i need help with this when some in killing to any player he doesnt get score who where death he get +1 score help me to fix this.....
PHP код:
new kstring[128]; //killer message
GetPlayerName(playerid, pname, sizeof(pname));
format(kstring, sizeof(kstring), "~b~Haha Ya 0wned %s",pname);
GameTextForPlayer(killerid, kstring, 4000, 3);
new kname[MAX_PLAYER_NAME]; //killername
GetPlayerName(killerid, kname, sizeof(kname));
format(pstring, sizeof(pstring), "~r~:( you got 0wned by %s",kname);
GameTextForPlayer(playerid, pstring, 4000, 3);
new kscore=GetPlayerScore(killerid);
SetPlayerScore(killerid,kscore++);
SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
PlayerInfo[playerid][Deaths]++;
PlayerInfo[killerid][Kills]++;
Re: help -
Threshold - 01.07.2014
pawn Код:
if(killerid != INVALID_PLAYER_ID)
{
new kstring[128], playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
format(kstring, sizeof(kstring), "~b~Haha Ya 0wned %s", playername);
GameTextForPlayer(killerid, kstring, 4000, 3);
GetPlayerName(killerid, playername, sizeof(playername));
format(pstring, sizeof(pstring), "~r~:( you got 0wned by %s", playername);
GameTextForPlayer(playerid, pstring, 4000, 3);
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 1); //Why do you give 'playerid' 1 score?
PlayerInfo[playerid][Deaths]++;
PlayerInfo[killerid][Kills]++;
}