2020-11-12, 08:25 PM
(2020-11-12, 08:11 PM)Expert* Wrote:PHP Code:public OnPlayerDeath(playerid,killerid,reason) { new str[128]; new name[32]; GetPlayerName(killerid,name,32); if( killstreak[playerid] >= 3 && killerid != INVALID_PLAYER_ID ) { new pname[24]; GetPlayerName(playerid, pname); format(str,sizeof(str) - 1,""RED"[DM] You have ended %s killstreak of %i kills...", pname, killstreak[playerid]); SendClientMessage(-1, killerid, str); } killstreak[killerid]; killstreak[playerid] = 0; switch(killstreak[killerid]) { case 3: { format(str,sizeof(str),""RED"[DM]"ORANGE" %s "GREY"is now "WHITE"Killing Spree"GREY"!!",name); SendClientMessageToAll(-1,str); } case 5: { format(str,sizeof(str),""RED"[DM]"ORANGE" %s "GREY"is now "WHITE"Dominating!!"GREY"!!",name); SendClientMessageToAll(-1,str); } case 6: { format(str,sizeof(str),""RED"[DM]"ORANGE" %s "GREY"is now "WHITE"UnStoppable!!"GREY"!!",name); SendClientMessageToAll(-1,str); } case 7: { format(str,sizeof(str),""RED"[DM]"ORANGE" %s "GREY"is now "WHITE"Wicked Sick!!"GREY"!!",name); SendClientMessageToAll(-1,str); } case 8: { format(str,sizeof(str),""RED"[DM]"ORANGE" %s "GREY"is now "WHITE"Monster like!!"GREY"!!",name); SendClientMessageToAll(-1,str); } case 9: { format(str,sizeof(str),""RED"[DM]"ORANGE" %s "GREY"is now "WHITE"GOD LIKE!!"GREY"!!",name); SendClientMessageToAll(-1,str); } case 10: { format(str,sizeof(str),""RED"[DM]"ORANGE" %s "GREY"is now "WHITE"Immortal!!"GREY"!!",name); SendClientMessageToAll(-1,str); SetPlayerArmour(killerid,100); } } return 1; }
Just create an { streak ,"message" } array as this one is inefficient af
Using Pawn.CMD?
If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
