Wysłany: 2015-02-15, 20:02
Pimpek2
Wiek: 29 Na forum: 4134 dni Posty: 82
Nick w MP: ElPablo
Piwa : 1
Witam chc? doda? co? takiego ??bym sam sobie nie m?g? mandatu wystawi?.:
do tej komendy:
Kod: CMD:mandat(playerid, p[])
{
if(Praca[playerid] == TEAM_POLICJA)
{
new player, quantity;
if(sscanf(p,"dd",player, quantity))
{
SendClientMessage(playerid, c_Poli, "/mandat [id gracza] [Kwota $]");
return 1;
}
if(!IsPlayerConnected(player))
{
SendClientMessage(playerid, c_Poli, "Gracz o podanym ID nie jest zalogowany.");
return 1;
}
if(quantity < 1 || quantity > 100000)
{
SendClientMessage(playerid, c_Pogo, "Z?a waluta. Podaj warto?? od 1 do 100000 $.");
return 1;
}
new string[128];
format(string, sizeof(string), "Da?e? Graczowi %s mandat w wysoko?ci %d$", PlayerName(player), quantity);
SendClientMessage(playerid, c_Poli, string);
format(string, sizeof(string), "Policjant %s da? ci kar? mandatow? w wysoko?ci %d$", PlayerName(playerid), quantity);
SendClientMessage(player, c_Poli, string);
GivePlayerMoney(player, -quantity);
}
return 1;
}
oczywi?cie nie musicie mi tego do komendy wkleja? wystarczy kodzik sam to w?o??.
Wysłany: 2015-02-15, 20:09
ToxiC.
Wiek: 28 Na forum: 5246 dni Posty: 3792
Piwa : 8590
Kod:
CMD:mandat(playerid, p[])
{
if(Praca[playerid] == TEAM_POLICJA)
{
new player, quantity;
if(sscanf(p,"dd",player, quantity))
{
SendClientMessage(playerid, c_Poli, "/mandat [id gracza] [Kwota $]");
return 1;
}
if(player == playerid) return SendClientMessage(playerid, -1, "nie mo?esz sam siebie ukara?!");
if(!IsPlayerConnected(player))
{
SendClientMessage(playerid, c_Poli, "Gracz o podanym ID nie jest zalogowany.");
return 1;
}
if(quantity < 1 || quantity > 100000)
{
SendClientMessage(playerid, c_Pogo, "Z?a waluta. Podaj warto?? od 1 do 100000 $.");
return 1;
}
new string[128];
format(string, sizeof(string), "Da?e? Graczowi %s mandat w wysoko?ci %d$", PlayerName(player), quantity);
SendClientMessage(playerid, c_Poli, string);
format(string, sizeof(string), "Policjant %s da? ci kar? mandatow? w wysoko?ci %d$", PlayerName(playerid), quantity);
SendClientMessage(player, c_Poli, string);
GivePlayerMoney(player, -quantity);
}
return 1;
}
Tagi: dodanie :: nie :: pozwolenia
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: