Код:
CMD:pay(playerid, params[])
{
new giveplayer[MAX_PLAYER_NAME], sendername[MAX_PLAYER_NAME], giveplayerid, moneys, idx,
playermoney, string[256];
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
playermoney = GetPlayerMoney(playerid);
if(!gPlayerLogged[playerid] == 1) return SendClientMessage(playerid, WHITE, ""PORTOCALIU"EROARE:"WHITE"Nu esti conectat.");
else if(sscanf(params, "ud", playerid, playermoney)) return SendClientMessage(playerid, WHITE,""PORTOCALIU"[FOLOSIRE]:"WHITE"/pay [nume / id] [suma]");
else if(moneys < 1 || moneys > 99999) return SendClientMessage(playerid, WHITE, ""PORTOCALIU"EROARE:"WHITE"Doar intre"PORTOCALIU" 1"WHITE" si "PORTOCALIU"99999"WHITE".");
else if(moneys > 999 && PlayerInfo[playerid][pLevel] < 2) return SendClientMessage(playerid, WHITE, ""PORTOCALIU"EROARE:"WHITE"Ai nevoie de level "PORTOCALIU"2"WHITE" sa oferi peste "PORTOCALIU"999"VERDE"$"WHITE".");
else if(!ProxDetectorS(3.5, playerid, giveplayerid)) return SendClientMessage(playerid, WHITE, ""PORTOCALIU"EROARE:"WHITE"Esti "PORTOCALIU"prea departe"WHITE".");
else if(PlayerInfo[giveplayerid][pLocal] == 106) return SendClientMessage(playerid, WHITE, ""PORTOCALIU"EROARE:"PORTOCALIU"INTERZIS"WHITE" sa oferi "VERDE"$"WHITE" in acest local.");
else if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, WHITE, ""PORTOCALIU"EROARE:"WHITE"Acel jucator nu este "PORTOCALIU"ONLINE"WHITE".");
else if(!moneys > 0 && playermoney >= moneys) return SendClientMessage(playerid, WHITE, ""PORTOCALIU"EROARE:"WHITE"N-ai atatia "VERDE"$"WHITE".");
else {
ConsumingMoney[giveplayerid] = 1;
GivePlayerMoney(playerid, (0 - moneys));
GivePlayerMoney(giveplayerid, moneys);
format(string, sizeof(string), " Ai platit pe "PORTOCALIU:%s(ID: %d), "VERDE"$%d"WHITE".", giveplayer,giveplayerid, moneys);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
SendClientMessage(playerid, WHITE, string);
format(string, sizeof(string), " Ai primit "VERDE"$%d"WHITE" de la "PORTOCALIU"%s(ID: %d)"WHITE".", moneys, sendername, playerid);
SendClientMessage(giveplayerid, WHITE, string);
format(string, sizeof(string), ""PORTOCALIU"%s"WHITE" plateste "VERDE"$%d"WHITE" la "PORTOCALIU"%s"WHITE".", sendername, moneys, giveplayer);
PayLog(string);
if(moneys >= 1000000) return ABroadCast(COLOR_YELLOW,string,1);
PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "*"POTOCALIU" %s"COLOR_PURPLE" ii ofera niste "VERDE"$"COLOR_PURPLE" la "PORTOCALIU"%s"COLOR_PURPLE".", sendername ,giveplayer);
ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
return 1;
}
Pastebin screwed the indentation. Don't mind it. But "
" is not the way to go and a little whitespace in your command also doesn't hurt. I tried to fix it as best I can, but it is not tested and not compiled because a) I do not have all the variables and defines and b) I do not speak Spanish or Italian or whatever language it is.
thank you very much .... is romanian language .. i'm romanian
Is not good.
I fix the command . No more problem , thanks anyway.