Wysłany: 2013-05-22, 16:15
Maxvell
d_b
Wiek: 26 Na forum: 4771 dni Posty: 83
Nick w MP: Kotlet
Piwa : 270
Siema,
[you]
mam problem z komenda wszystko mysle ze jest dobrze napisane ale jak wpisuje to nic sie nie dzieje tu jest kod prosze o pomoc napewno bedzie
Kod: if (strcmp(cmd, "/mandat", true)==0) {
if(gTeam[playerid] == TEAM_SG){
new moneyplayer;
new moneyplus;
mpt = strtok(cmdtext, idx);
if(!strlen(mpt)) {
SendClientMessage(playerid, COLOR_GREY, "/mandat [ID gracza] [suma]");
} else {
moneyplayer = strval(mpt);
mpt = strtok(cmdtext, idx);
if(!strlen(mpt)) {
SendClientMessage(playerid, COLOR_ADMIN, "Z?a waluta");
} else {
moneyplus = strval(mpt);
new moneyplayername[MAX_PLAYER_NAME];
GetPlayerName(moneyplayer,moneyplayername,sizeof(moneyplayername));
format(string, sizeof(string), "Straznik %s (id:%d) dal mandat w wysokosci %d$ graczowi %s (id: %d)",PlayerName(playerid),playerid, moneyplus, moneyplayername,giveplayerid);
printf(string);
format(string, sizeof(string), "Da?e? %d$ graczowi mandat w wysoko?ci %s $",moneyplus, moneyplayername);
SendClientMessage(playerid, COLOR_GREEN, string);
format(string, sizeof(string), "Straznik %s da? ci kar? mandatow? w wysoko?ci %d$",PlayerName(playerid),moneyplus);
SendClientMessage(moneyplayer, COLOR_GREEN, string);
GivePlayerMoney(moneyplayer, -moneyplus);
}
}
}
return 1;
}
Wysłany: 2013-05-22, 16:34
xqz
otaku desu!
Wiek: 32 Na forum: 6407 dni Posty: 723
Nick w MP: xqz
Piwa : 5465
Wysłany: 2013-05-22, 16:45
wojownik27
Wiek: 47 Na forum: 4771 dni Posty: 23
Nick w MP: KolekcjaMilitarna
Piwa : 46
Tu masz ca?e CMD prawidlowo wykonane: Kod: if (strcmp(cmd, "/mandat", true)==0){
{
new mandat[256];
mandat = strtok(cmdtext, idx);
new skin = GetPlayerSkin(playerid);
if (skin == 280)
{
if(!strlen(mandat))
{
SendClientMessage(playerid, CZERWONY, "WPISZ: /mandat [id gracza]");
return 1;
}
SendClientMessage(playerid, ZIELONY, "Wystawi?e? Mandat w wysoko?ci 1000$ ");
GivePlayerMoney(playerid, 1000);
new gracz = strval(mandat);
GivePlayerMoney(gracz, -1000);
SendClientMessage(gracz, CZERWONY, "Otrzyma?e? mandat w wysoko?ci 1000$ ");
}
}
return 1;
}
AVE http://samp-host.manifo.com
Wysłany: 2013-05-22, 16:59
Maxvell
d_b
Wiek: 26 Na forum: 4771 dni Posty: 83
Nick w MP: Kotlet
Piwa : 270
Dzieki wielkie leci
Tagi: komenda
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: