16.11.2008, 20:07
hi
i have now a /pay command. but how can i do it that all /pay things are saved in the pay.log file??
/pay by KeksOfDeath:
and how can i save all admincommands who were used by the admins in a log file?? /i use seif adminfs)
greetings
gta
i have now a /pay command. but how can i do it that all /pay things are saved in the pay.log file??
/pay by KeksOfDeath:
Код:
// /pay if(!strcmp(strget(cmdtext, 0), "/pay")) { new typ = strval(strget(cmdtext, 1)); if(IsPlayerConnected(typ)) { new summe = strval(strget(cmdtext, 2)); if(GetPlayerMoney(playerid) >= summe) { if(summe <= 0 || summe >= 100001) { SendClientMessage(playerid,COLOR_RED,"Don't go under 1$ and above 100000$"); } else { new string[256], str[256], geber[MAX_PLAYER_NAME], erhalter[MAX_PLAYER_NAME]; GetPlayerName(playerid,geber,sizeof(geber)); GetPlayerName(typ,erhalter,sizeof(erhalter)); format(str,sizeof(str),"You have solt %d$ to %s",summe,erhalter); format(string,sizeof(string),"You received %d$ from %s",summe,geber); SendClientMessage(playerid,COLOR_NEUTRALGREEN,str); SendClientMessage(typ,COLOR_NEUTRALGREEN,string); GivePlayerMoney(playerid,-summe); GivePlayerMoney(typ,summe); }} else { SendClientMessage(playerid,COLOR_RED,"You don't have enough money"); }} else { SendClientMessage(playerid,COLOR_RED,"INVALID ID"); } return 1; }
greetings
gta