25.02.2014, 19:14
Hello, im currently remaking a gamemode from GTA V (Further details to be released soon), as I mentioned in my last post, but there is a problem with GetPlayerName, but luckily no errors. The killer's name won't show within the chat (Just a side note, people are being eliminated via vehicle vs vehicle)
Here's some code;
Here's some code;
Код:
public OnPlayerDeath(playerid, killerid, reason) { playerveh = GetPlayerVehicleID(playerid); DestroyVehicle(playerveh); SendDeathMessage(killerid, playerid, reason); SetPlayerScore(killerid,GetPlayerScore(killerid)+5); SetPlayerScore(playerid,GetPlayerScore(playerid)-1); GivePlayerMoney(killerid, 100000); GivePlayerMoney(playerid, -15000); PlayerPlaySound(playerid, 1085, 0.0, 0.0, 10.0); new pID_name[MAX_PLAYER_NAME], killerID_name[MAX_PLAYER_NAME], Message[128]; GetPlayerName(playerid, pID_name, MAX_PLAYER_NAME); GetPlayerName(killerid, killerID_name, MAX_PLAYER_NAME); switch(random(56)) { case 0: format(Message, sizeof(Message), "%s beat down %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 1: format(Message, sizeof(Message), "%s smashed %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_GREEN, Message); case 2: format(Message, sizeof(Message), "%s butchered %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_BLUE, Message); case 3: format(Message, sizeof(Message), "%s cut up %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_YELLOW, Message); case 4: format(Message, sizeof(Message), "%s spiked %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_BLUE, Message); case 5: format(Message, sizeof(Message), "%s striped %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 6: format(Message, sizeof(Message), "%s capped %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 7: format(Message, sizeof(Message), "%s clocked %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_BLUE, Message); case 8: format(Message, sizeof(Message), "%s pistoled %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 9: format(Message, sizeof(Message), "%s smoked %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 10: format(Message, sizeof(Message), "%s whacked %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 11: format(Message, sizeof(Message), "%s 12 bored %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_BLUE, Message); case 12: format(Message, sizeof(Message), "%s blew away %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 13: format(Message, sizeof(Message), "%s farmed %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 14: format(Message, sizeof(Message), "%s opened up %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 15: format(Message, sizeof(Message), "%s perforated %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 16: format(Message, sizeof(Message), "%s shelled %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 17: format(Message, sizeof(Message), "%s put a load in %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_BLUE, Message); case 18: format(Message, sizeof(Message), "%s cancelled %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 19: format(Message, sizeof(Message), "%s crossed out %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 20: format(Message, sizeof(Message), "%s cut down %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_BLUE, Message); case 21: format(Message, sizeof(Message), "%s massacred %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 22: format(Message, sizeof(Message), "%s peppered %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 23: format(Message, sizeof(Message), "%s plugged %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_BLUE, Message); case 24: format(Message, sizeof(Message), "%s riddled %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 25: format(Message, sizeof(Message), "%s sprayed %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 26: format(Message, sizeof(Message), "%s ventilated %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 27: format(Message, sizeof(Message), "%s 3rd worlded %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_BLUE, Message); case 28: format(Message, sizeof(Message), "%s armied %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 29: format(Message, sizeof(Message), "%s drilled %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 30: format(Message, sizeof(Message), "%s ended %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_BLUE, Message); case 31: format(Message, sizeof(Message), "%s killed %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 32: format(Message, sizeof(Message), "%s machined %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 33: format(Message, sizeof(Message), "%s terminated %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_BLUE, Message); case 34: format(Message, sizeof(Message), "%s brought down %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 35: format(Message, sizeof(Message), "%s lightning bolted %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 36: format(Message, sizeof(Message), "%s picked off %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 37: format(Message, sizeof(Message), "%s sniped %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 38: format(Message, sizeof(Message), "%s surprised %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 39: format(Message, sizeof(Message), "%s nailed %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 40: format(Message, sizeof(Message), "%s barbecued %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message);// case 41: format(Message, sizeof(Message), "%s blazed %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_BLUE, Message); case 42: format(Message, sizeof(Message), "%s burnt %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 43: format(Message, sizeof(Message), "%s cooked %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 44: format(Message, sizeof(Message), "%s flame grilled %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 45: format(Message, sizeof(Message), "%s roasted %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_BLUE, Message); case 46: format(Message, sizeof(Message), "%s torched %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 47: format(Message, sizeof(Message), "%s atomized %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 48: format(Message, sizeof(Message), "%s blasted %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 49: format(Message, sizeof(Message), "%s blew up %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 50: format(Message, sizeof(Message), "%s detonated %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 51: format(Message, sizeof(Message), "%s f*cked up %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 52: format(Message, sizeof(Message), "%s shocked & awed %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 53: format(Message, sizeof(Message), "%s totaled %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 54: format(Message, sizeof(Message), "%s hit and runned %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); case 55: format(Message, sizeof(Message), "%s manslaughtered %s!", killerID_name, pID_name), SendClientMessageToAll(COLOR_ORANGE, Message); } }