Snoop | Дата: Пятница, 26.08.2011, 20:57:46 | Сообщение # 1 |
Группа: Пользователи
Сообщений: 98
| Code if(strcmp(cmd, "/pay", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "Ïîäñêàçêà: /pay [playerid/PartOfName] [amount]"); return 1; } //giveplayerid = strval(tmp); giveplayerid = strval(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "Ïîäñêàçêà: /pay [playerid/PartOfName] [amount]"); return 1; } moneys = strval(tmp); if(moneys > 1000 && PlayerInfo[playerid][pLevel] < 3) { SendClientMessage(playerid, COLOR_GRAD1, "Áîëüøå 10000 òîëüêî ñ 3 ëâë!"); return 1; } if(moneys < 1 || moneys > 1000000) { SendClientMessage(playerid, COLOR_GRAD1, "Ìèíèìóì 1, ìàêñèìóì 1000000."); return 1; } if (IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(PlayerInfo[giveplayerid][pLocal] == 106) { SendClientMessage(playerid, COLOR_GRAD1, "Command not allowed in this location"); return 1; } if (ProxDetectorS(5.0, playerid, giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); playermoney = GetPlayerMoney(playerid); if (moneys > 0 && playermoney >= moneys) { ConsumingMoney[giveplayerid] = 1; GiveMoney(playerid, (0 - moneys)); GiveMoney(giveplayerid, moneys); format(string, sizeof(string), " Òû ïåðåäàë %s(èãðîêó: %d), $%d.", giveplayer,giveplayerid, moneys); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); SendClientMessage(playerid, COLOR_GRAD1, string); format(string, sizeof(string), " Òû ïîëó÷èë $%d îò %s(player: %d).", moneys, sendername, playerid); SendClientMessage(giveplayerid, COLOR_GRAD1, string); format(string, sizeof(string), "%s çàïëàòèë $%d ê %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 âûíèìàåò íåêîòîðûå íàëè÷íûå äåíüãè, è îòäà¸ò èõ %s.", sendername ,giveplayer); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); ApplyAnimation(playerid,"DEALER","shop_pay",4.1,0,0,0,0,0); } else { SendClientMessage(playerid, COLOR_GRAD1, " Ó òåáÿ íåò ñòîëüêî äåíåã! ."); } } else { SendClientMessage(playerid, COLOR_GRAD1, " Ýòîò èãðîê ñëèøêîì äàë¸êî îò âàñ! ."); } }//invalid id } else { format(string, sizeof(string), " %d èãðîê íå â èãðå.", giveplayerid); SendClientMessage(playerid, COLOR_GRAD1, string); } } return 1; }
С какого лвл Можно,и сколько Code if(moneys > 1000 && PlayerInfo[playerid][pLevel] < 3)
Сколько можно Макс.Передовать В данном случае 1.000.000 Code if(moneys < 1 || moneys > 1000000) и Code if(moneys >= 1000000)
|
|
|
|