04.09.2011, 06:38
Hi, i have two problems, first: i want to see all logs, what server do, in server_log is only ready results, because something crashesh server.
Second problem is not working /pay, when i use this crash me and this men who i pay.
Sorry for my bad English.
Second problem is not working /pay, when i use this crash me and this men who i pay.
Код:
if(strcmp(cmd, "/pay", true) == 0 || strcmp(cmd, "/plac", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pConnectTime] < 2) { SendClientMessage(playerid, COLOR_GRAD1, "Musisz byc co najmniej 2 godziny aby dostac wyplate"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "{33CCFF}Wpisz:{FFFFFF} /plac [ID/CzescNicku] [ilosc]"); return 1; } //giveplayerid = strval(tmp); giveplayerid = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "{33CCFF}Wpisz:{FFFFFF} /plac [ID/CzescNicku] [ilosc]"); return 1; } moneys = strval(tmp); if(moneys > 1000 && PlayerInfo[playerid][pConnectTime] < 8) { SendClientMessage(playerid, COLOR_GREY, " Musisz miec co najmniej 8 godzin gry, aby dac wiecej niz 1000!"); return 1; } if(moneys < 1 || moneys > 99999) { SendClientMessage(playerid, COLOR_GRAD1, "Nie mozesz ponizej 1 lub powyzej 99999 na raz."); return 1; } if (IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(PlayerInfo[giveplayerid][pLocal] == 106) { SendClientMessage(playerid, COLOR_GRAD1, "Polecenie niedozwolone w tej lokalizacji"); return 1; } if (ProxDetectorS(5.0, playerid, giveplayerid)) { if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, " Nie mozna placic za siebie !"); return 1; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); //GetPlayerName(playerid, sendername, sizeof(sendername)); playermoney = GetCash(playerid); if (moneys > 0 && playermoney >= moneys) { //ConsumingMoney[giveplayerid] = 1; GiveCash(playerid, (0 - moneys)); GiveCash(giveplayerid, moneys); format(string, sizeof(string), " Wyslano %s(player: %d), $%d.", giveplayer,giveplayerid, moneys); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); SendClientMessage(playerid, COLOR_GRAD1, string); format(string, sizeof(string), " Odebrano $%d from %s(player: %d).", moneys, sendername, playerid); SendClientMessage(giveplayerid, COLOR_GRAD1, string); format(string, sizeof(string), "%s zaplacil $%d to %s", sendername, moneys, giveplayer); PayLog(string); if(moneys >= 1000000) { ABroadCast(COLOR_YELLOW,string,1); } PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "* %s podaje troche gotowki do %s.", sendername ,giveplayer); ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); ApplyAnimation(playerid,"Sprzedawca","sklep_zaplata",4.1,0,0,0,0,0); } else { SendClientMessage(playerid, COLOR_GRAD1, " Nieprawidlowa kwota transakcji."); } } else { SendClientMessage(playerid, COLOR_GRAD1, " Jestes za daleko."); } }//invalid id } else { format(string, sizeof(string), " %d nie jest aktywnym graczem.", giveplayerid); SendClientMessage(playerid, COLOR_GRAD1, string); } } return 1; }