Quote
Originally posted by Blue_Sky@19/07/07 - 13:17
Mi servirebbe qualcosina 
Anti TeamKilling
Scritte tipo pwne** dopo tot kill di fila.
Una spiegazione di INVALID_PLAYER_ID cioè, che un player a caso quando spawna ha un ruolo speciale... Tipo ManHunt di Mike... (uno è la preda gli altri lo cacciano)
Se muore il giocatore scelto per quel ruolo speciale finisce la gm con la scritta che dice il killer.
Anti Team killing:
OnPlayerDeath:
if(gTeam[killerid] == gTeam[playerid]) {
SetPlayerHealth(killerid,0);
SetPlayerScore(killerid,GetPlayerScore(killerid),-1);
}
Fun message dopo dei kill consecutive:
In testa alla GM:
new consecutive[MAX_PLAYERS];
OnPlayerSpawn:
consecutive[playerid] = 0;
OnPlayerDeath
new name[MAX_PLAYER_NAME];
new string[256];
consecutive[killerid]++;
GetPlayerName(killerid,name,sizeof(name));
if(consecutive[killerid] == 5) {
format(string,sizeof(string),"%s ~n~~y~is on a Killing Spree!!!",name);
GameTextForAll(string,5000,1);
}
if(consecutive[killerid] == 10) {
format(string,sizeof(string),"%s ~n~~y~owned The Entire Server...",name);
GameTextForAll(string,5000,1);
}
...e così via.
Spiegazione INVALID_PLAYER_ID:
Beh, lo dice la parola stessa, è un player invalido, come ad esempio se hai nell'OnPlayerDeath questo:
if(killerid == INVALID_PLAYER_ID) {
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
}
Il killerid è anche il playerid, quindi è un suicidio.
Nella GM Manhunt, l'INVALID_PLAYER_ID viene scelto a random, quindi è un player a caso, invalido.
Poi, per l'ultima, dovrebbe essere così:
In testa alla GM:
forward GameModeExitFunc();
OnPlayerDeath:
new name[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
new string[256];
GetPlayerName(killerid,name,sizeof(name));
GetPlayerName(playerid,playername,sizeof(playername));
if(playerid == INVALID_PLAYER_ID) {
SendDeathMessage(killerid,playerid,reason);
format(string,sizeof(string),"%s ha ucciso %s",name,playername);
GameTextForAll(string,5000,6);
for (new i=0; i<MAX_PLAYERS; i++) {
TogglePlayerControllable(i,0);
}
SetTimer("GameModeExitFunc",5000,0);
}
A parte:
public GameModeExitFunc() {
GameModeExit();
return 1;
}