Guest AvEpl Odesláno: 25. Leden, 2009 Share Odesláno: 25. Leden, 2009 Ahoj obejvil sem zde: public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/kill", cmdtext, true, 10) == 0) { SetPlayerHealth(playerid,0.0); SendClientMessage(playerid,BARVA_CERVENA,"Zabil jsi se!!"); return 1; Ale když dám /kill tak to přidá bod jedné strane mohl by mi nekdo poradit jak udelat aby to nepřidávalo bod? Dekuji.. Link to comment Share on other sites More sharing options...
0 癌癌癌 1 Odesláno: 25. Leden, 2009 Share Odesláno: 25. Leden, 2009 V tom co si sem napsal žadny skore nevidim :wtf: ... tak nwm Pápá Link to comment Share on other sites More sharing options...
0 Guest AvEpl Odesláno: 25. Leden, 2009 Share Odesláno: 25. Leden, 2009 Taki videt nemuzes kdyz sem to sem nedal:D ja jen potřebuju upravit ten kod na /kill aby nepřídával žádný straně bod...Sry moc se v tom este nevyznám sem v tom teprv 2 den:D Link to comment Share on other sites More sharing options...
0 癌癌癌 1 Odesláno: 25. Leden, 2009 Share Odesláno: 25. Leden, 2009 no pravě tenhle kod nic neděla jen zabije toho kdo da /kill ne? Link to comment Share on other sites More sharing options...
0 Guest AvEpl Odesláno: 25. Leden, 2009 Share Odesláno: 25. Leden, 2009 tak tu je Score.. public OnPlayerDeath(playerid, killerid, reason) { SendDeathMessage(killerid, playerid, reason); connect[playerid] = 1; SetPlayerScore(killerid, GetPlayerScore(killerid)+1); if(iPlayerRole[playerid] == 2 ) { ScoreKill2++; format(string, 256,"a_C %d : %d HOSTE",ScoreKill,ScoreKill2); SendClientMessageToAll(BARVA_ZLUTA,string); } if(iPlayerRole[playerid] == 3) { ScoreKill++; format(string, 256,"a_C %d : %d HOSTE",ScoreKill,ScoreKill2); SendClientMessageToAll(BARVA_ZLUTA,string); } if(ScoreKill2 == 30) { ScoreKill = 0; ScoreKill2 = 0; ScoreKill2W++; GameTextForAll("~r~HOSTE ~w~win ~g~round", 5000, 3); format(string,sizeof(string),"Score round: a_C %d : %d HOSTE",ScoreKillW,ScoreKill2W); SendClientMessageToAll(BARVA_MODRA,string); } if(ScoreKill == 30) { ScoreKill = 0; ScoreKill2 = 0; ScoreKillW++; GameTextForAll("~g~a_C ~w~win ~r~round", 5000, 3); format(string,sizeof(string),"Score round: a_C %d : %d HOSTE",ScoreKillW,ScoreKill2W); SendClientMessageToAll(BARVA_MODRA,string); } if(ScoreKill2W == 3) { ScoreKill = 0; ScoreKill2 = 0; GameTextForAll("~g~Vitezem ~w~CW se stava ~r~HOSTE", 5000, 3); SendClientMessageToAll(BARVA_CERVENA,"----------------------------------------------------------"); format(string,sizeof(string),"TOTAL score: a_C %d : %d HOSTE",ScoreKillW,ScoreKill2W); SendClientMessageToAll(BARVA_CERVENA,"----------------------------------------------------------"); SendClientMessageToAll(BARVA_CERVENA,string); ScoreKillW = 0; ScoreKill2W = 0; } if(ScoreKillW == 3) { ScoreKill = 0; ScoreKill2 = 0; GameTextForAll("~r~Vitezem ~w~CW se stava ~g~a_C", 5000, 3); SendClientMessageToAll(BARVA_CERVENA,"----------------------------------------------------------"); format(string,sizeof(string),"TOTAL score: a_C %d : %d HOSTE",ScoreKillW,ScoreKill2W); SendClientMessageToAll(BARVA_CERVENA,"----------------------------------------------------------"); SendClientMessageToAll(BARVA_CERVENA,string); ScoreKillW = 0; ScoreKill2W = 0; Link to comment Share on other sites More sharing options...
0 chytrak 14 Odesláno: 25. Leden, 2009 Share Odesláno: 25. Leden, 2009 Jde o to ze ten prikaz jen vyvola public OnPlayerDeath, kde se score pricita, dej si do prikazu promenou, kterou budes mit pri pricitani bodu treba /kill promena[playerid] = 1; f(iPlayerRole[playerid] == 2 && promena[playerid] == 0) { ScoreKill2++; format(string, 256,"a_C %d : %d HOSTE",ScoreKill,ScoreKill2); SendClientMessageToAll(BARVA_ZLUTA,string); } if(iPlayerRole[playerid] == 3 && promena[playerid] == 0) { ScoreKill++; format(string, 256,"a_C %d : %d HOSTE",ScoreKill,ScoreKill2); SendClientMessageToAll(BARVA_ZLUTA,string); } promena[playerid] = 0; Link to comment Share on other sites More sharing options...
0 Guest AvEpl Odesláno: 25. Leden, 2009 Share Odesláno: 25. Leden, 2009 Ha tak to bude na dlouho ete se mám co učit:D A díkk ale mohl bys my pls este poradti Kam to mám dat?? Díík Link to comment Share on other sites More sharing options...
0 chytrak 14 Odesláno: 25. Leden, 2009 Share Odesláno: 25. Leden, 2009 no ty vlastne k tomu svemu pridas promenou, ktera kontroluje pri pricitani bodu, jestli se zabil sam, nebo mu nekdo pomohl. Nahoru do modu new Sebevrazda[MAX_PLAYERS]; // definice promene public OnPlayerConnected(playerid) Sebevrazda = 0; Do prikazu /kill if (strcmp("/kill", cmdtext, true, 10) == 0) { SetPlayerHealth(playerid, 0.0); SendClientMessage(playerid, BARVA_CERVENA, "Zabil jsi se!!"); Sebevrazda[playerid] = 1; } ////// tak zatim mame nastaveni promene public OnPlayerDeath(playerid, killerid, reason) if(iPlayerRole[playerid] == 2 && Sebevrazda[playerid] == 0) // zjistujeme kdyz ma promenou 2a nezabil se sam { ScoreKill2++; format(string, 256, "a_C %d : %d HOSTE", ScoreKill, ScoreKill2); SendClientMessageToAll(BARVA_ZLUTA, string); } if(iPlayerRole[playerid] == 3 && Sebevrazda[playerid] == 0) // kdyz ma promenou 3 a nezabil se sem { ScoreKill++; format(string, 256,"a_C %d : %d HOSTE", ScoreKill, ScoreKill2); SendClientMessageToAll(BARVA_ZLUTA,string); } Sebevrazda[playerid] = 0; // vynulovani promene na konci publicu Link to comment Share on other sites More sharing options...
0 Guest AvEpl Odesláno: 25. Leden, 2009 Share Odesláno: 25. Leden, 2009 Dík moc:d Link to comment Share on other sites More sharing options...
Dotaz
Guest AvEpl
Ahoj obejvil sem zde:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid,0.0);
SendClientMessage(playerid,BARVA_CERVENA,"Zabil jsi se!!");
return 1;
Ale když dám /kill tak to přidá bod jedné strane mohl by mi nekdo poradit jak udelat aby to nepřidávalo bod? Dekuji..
Link to comment
Share on other sites
8 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now