Sziasztok az imént nézegettem az angol fórumon a GiveCash Script-eket! Találtam egyet és gondoltam hogy magyarositom és egy kicsit editelek rajta!
Edit idõ: 2perc
Eredeti készitõ: HAYTXA
Edittelõ: Acer11[LogiTech]Eredeti link: http://forum.sa-mp.com/showthread.php?t=138104 //--Ezt a scriptet editteltem ahogy a többi player--//
#include <a_samp>
#include <core>
#include <float>
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define PocketMoney 50000
#define INACTIVE_PLAYER_ID 255
#define GIVECASH_DELAY 5000
#if defined FILTERSCRIPT
#define NUMVALUES 4
forward Givecashdelaytimer(playerid);
forward SetupPlayerForClassSelection(playerid);
forward SendPlayerFormattedText(playerid, const str[], define);
forward public SendAllFormattedText(playerid, const str[], define);
public OnFilterScriptInir()
{
print(\"\\n--------------------------------------\");
print(\" Pénz küldõ rendszer by Acer11/LogiTech\");
print(\"BETÖLTÉS...\");
print(\"--------------------------------------\\n\");
print(\"BETÖLTVE\");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
}
#endif
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new string[256];
new playermoney;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new cmd[256];
new giveplayerid, moneys, idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, \"/penztad\", true) == 0) {
new tmp[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /penztad [iD] [ÖSSZEG]\");
return 1;
}
giveplayerid = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /penztad [iD] [ÖSSZEG]\");
return 1;
}
moneys = strval(tmp);
if (IsPlayerConnected(giveplayerid)) {
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
playermoney = GetPlayerMoney(playerid);
if (moneys > 0 && playermoney >= moneys) {
GivePlayerMoney(playerid, (0 - moneys));
GivePlayerMoney(giveplayerid, moneys);
format(string, sizeof(string), \"Pénz átküldve: %s(player: %d), $%d.\", giveplayer,giveplayerid, moneys);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), \"Pénzt át adtad $%d neki %s(Játékos: %d).\", moneys, sendername, playerid);
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
printf(\"%s(playerid:%d) Sikeresen átküldve %d neki %s(Játékos: %d)\",sendername, playerid, moneys, giveplayer, giveplayerid);
}
else {
SendClientMessage(playerid, COLOR_YELLOW, \"Sikertelen átküldés!\");
}
}
else {
format(string, sizeof(string), \"%d nincs online\", giveplayerid);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
return 1;
}
return 0;
}
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= \' \'))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > \' \') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
LETÖLTÉS:
http://www.solidfiles.com/d/8c239949ef/