SA-MP Forums Archive
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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help.. (/showthread.php?tid=171939)



Kill + weapon - jaksimaksi - 28.08.2010

How could i make a script likt this: when player kills other players he gets a new gun, i made a script but, when player deads, he is starting to get guns from 0 ... i want that player kills 3 players gets a deagle, and if he deads, he continues to shotgun.. sorry bad english


Код:
public OnPlayerDeath(playerid, killerid, reason)
{
Gun[playerid] = 0;
Gun[killerid]++;
if(Gun[killerid] == 3)
{
new pName[MAX_PLAYER_NAME]; GetPlayerName(killerid,pName,MAX_PLAYER_NAME);
new string[128]; format(string,sizeof(string),"%s next lvl, deagle",pName);
SendClientMessageToAll(Red, string);
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid, 24, 100);

}

if(Gun[killerid] == 6)
{
new pName[MAX_PLAYER_NAME]; GetPlayerName(killerid,pName,MAX_PLAYER_NAME);
new string[128]; format(string,sizeof(string),"%s next lvl shotgun",pName);
SendClientMessageToAll(Red, string);
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid, 24, 100);
}
return 1;
}



Re: Help.. - Mike Garber - 28.08.2010

Deads?
Basicly a gungame rip-off?


Re: Help.. - jaksimaksi - 28.08.2010

yes, gungame