Jump to content
  • 0

pomoc pad servera pr. /kill


Invouk

Dotaz

Prepačte že otravuj pre nekeho to je jednoduche ale ja som prvy krat u toho a rozmišlam :d

ked dam /kill padne server nemalo by to byt ...

 

 

string getplayxer name ... nejak inde lebo ja nwm proadtee :d čo ma mam spravit + dajte cely kod

 

DAUKJEM ZA OCOTU A POMOC

 

 

public OnPlayerCommandText(playerid, cmdtext[])

{

if (strcmp("/kill", cmdtext, true, 10) == 0)

{

new string[140];

new nick[MAX_PLAYER_NAME];

GetPlayerName(playerid,nick,MAX_PLAYER_NAME);

format(string,140,"Hrač %s(%d)Poučil prikaz /kill");

GivePlayerMoney(playerid, -5000);

SendClientMessage(playerid,0xFFFFFFFF,"[server]Použil Si prikaz /kill bol ti odobratych 5000");

SendClientMessageToAll(0xFF0000FFF,"[server]Hráč %s ˇ%d");

SetPlayerHealth(playerid,0);

return 1;

}

return 0;

}

Link to comment
Share on other sites

6 odpovědí na tuto otázku

Recommended Posts

  • 0
  • Hlavní moderátor
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
new string[140];
new nick[MAX_PLAYER_NAME];
GetPlayerName(playerid,nick,MAX_PLAYER_NAME);
format(string,140,"Hrač %s(%d)Poučil prikaz /kill",nick,playerid);
GivePlayerMoney(playerid, -5000);
SendClientMessage(playerid,0xFFFFFFFF,"[server]Použil Si prikaz /kill bol ti odobratych 5000");
SendClientMessageToAll(0xFF0000FFF,string);
SetPlayerHealth(playerid,0);
return 1;
}
return 0;
}

Link to comment
Share on other sites

  • 0

Dakujem :) aspom dalšie som sa naučil :)

 

public OnPlayerCommandText(playerid, cmdtext[])

{

if (strcmp("/kill", cmdtext, true, 10) == 0)

{

new string[450];

new nick[MAX_PLAYER_NAME];

GetPlayerName(playerid,nick,MAX_PLAYER_NAME);

format(string,140,"COLOR_WHITE,[server] Hrač COLOR_ORANZCERV, %s(%d) COLOR_GREEN, Použil prikaz /kill bolo mu odobranych 5000$",nick,playerid);

GivePlayerMoney(playerid, -5000);

SetPlayerHealth(playerid,0);

SetPlayerArmour(playerid,0);

return 1;

}

return 0;

}

 

Teraz zas nevypisuje nechapem prečo ... a ako zmenim v tm farbu ? ...

Link to comment
Share on other sites

  • 0

Server ti padne preto, lebo posielaš správu so znakom „%“ !! (Také niečo som kdesi čítal :d )

 

 

A vEnd ti napísal ako to opraviť...

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
new string[140];
new nick[MAX_PLAYER_NAME];
GetPlayerName(playerid,nick,MAX_PLAYER_NAME);
format(string,140,"Hrač %s(%d)Poučil prikaz /kill",nick,playerid);
GivePlayerMoney(playerid, -5000);
SendClientMessage(playerid,0xFFFFFFFF,"[server]Použil Si prikaz /kill bol ti odobratych 5000");
SendClientMessageToAll(0xFF0000FFF,string);
SetPlayerHealth(playerid,0);
return 1;
}
return 0;
}

Link to comment
Share on other sites

  • 0

nič v zlom :d ale môžem sa opýtať aky to robiš mod ? :) ked len za usmrtenie ti stiahne -5000 :d to aj v realnom živote ked sa chcem podrezať tak by som zaplatil 5 000€/$ ? :d

Link to comment
Share on other sites

  • 0

Kdo povedal že robim mod ??? ako

učm sa pawno a chcem poradit to ano to nemožem CoMBoX

a keby som robyl mod

Tak RP !

San Fierro Role Play

SFRP

!!! nemožte mi ukradnut kdo hej možem žadat samp tym o zmazanie serveru :d

a RP bude zaravat ako v ealnom živote čiže nwm kolko stoji ošetrenie .. :d to sa ude platiti pojistka :d

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...