CMD:penzbar(playerid, params[]){new muvelet[16]; //Létrehozzuk a változót, amibe az elvégzendõ mûveletet szeretnénk rakni.if(sscanf(params, \"s[16]\", muvelet)) return SendClientMessage(playerid, -1, \"Használata: /pénz [be/ki] - Ezzel a forint jelzõt kapcsolhatod ki\");if(!strcmp(\"be\", muvelet)){TextDrawHideForPlayer(playerid, Box[playerid]);TextDrawHideForPlayer(playerid, Ft[playerid]);SendClientMessage(playerid, VILAGOSPIROS, \"Pénzcsík skeresen bekapcsolva!\");return 1;}if(!strcmp(\"ki\", muvelet)){TextDrawHideForPlayer(playerid, Box[playerid]);TextDrawHideForPlayer(playerid, Ft[playerid]);SendClientMessage(playerid, VILAGOSPIROS, \"Pénzcsík skeresen kikapcsolva!\");return 1;}return 0;}
, hanem [code=pawn] Javítottam [/mod]
CMD:penzbar(playerid, params[]){ new muvelet[16]; //Létrehozzuk a változót, amibe az elvégzendõ mûveletet szeretnénk rakni. if(sscanf(params, \"s[16]\", muvelet)) return SendClientMessage(playerid, -1, \"Használata: /pénz [be/ki] - Ezzel a forint jelzõt kapcsolhatod ki\"); if(!strcmp(\"be\", muvelet)) { TextDrawShowForPlayer(playerid, Box[playerid]); TextDrawShowForPlayer(playerid, Ft[playerid]); SendClientMessage(playerid, VILAGOSPIROS, \"Pénzcsík skeresen bekapcsolva!\"); return 1; } if(!strcmp(\"ki\", muvelet)) { TextDrawHideForPlayer(playerid, Box[playerid]); TextDrawHideForPlayer(playerid, Ft[playerid]); SendClientMessage(playerid, VILAGOSPIROS, \"Pénzcsík skeresen kikapcsolva!\"); return 1; } return 0;}
A boxot ne kacsold ki. Az alapot lehetetlen (SAMPban).
forward CheckMoney(playerid);public CheckMoney(playerid){ new string[128], asd[128], asd2[128], asd3[128];if(pInfo[playerid][pMoney] < 10){format(string, sizeof(string), \"$0000000%i\", pInfo[playerid][pMoney]);TextDrawSetString(Ft[playerid], string);TextDrawShowForPlayer(playerid, Ft[playerid]);TextDrawShowForPlayer(playerid, Box[playerid]);}if(10 <= pInfo[playerid][pMoney] < 100){format(string, sizeof(string), \"$000000%i\", pInfo[playerid][pMoney]);TextDrawSetString(Ft[playerid], string);TextDrawShowForPlayer(playerid, Ft[playerid]);TextDrawShowForPlayer(playerid, Box[playerid]);}if(100 <= pInfo[playerid][pMoney] < 1000){format(string, sizeof(string), \"$00000%i\", pInfo[playerid][pMoney]);TextDrawSetString(Ft[playerid], string);TextDrawShowForPlayer(playerid, Ft[playerid]);TextDrawShowForPlayer(playerid, Box[playerid]);}if(1000 <= pInfo[playerid][pMoney] < 10000){format(string, sizeof(string), \"$0000%i\", pInfo[playerid][pMoney]);TextDrawSetString(Ft[playerid], string);TextDrawShowForPlayer(playerid, Ft[playerid]);TextDrawShowForPlayer(playerid, Box[playerid]);}if(10000 <= pInfo[playerid][pMoney] < 100000){format(string, sizeof(string), \"$000%i\", pInfo[playerid][pMoney]);TextDrawSetString(Ft[playerid], string);TextDrawShowForPlayer(playerid, Ft[playerid]);TextDrawShowForPlayer(playerid, Box[playerid]);}if(100000 <= pInfo[playerid][pMoney] < 1000000){format(string, sizeof(string), \"$00%i\", pInfo[playerid][pMoney]);TextDrawSetString(Ft[playerid], string);TextDrawShowForPlayer(playerid, Ft[playerid]);TextDrawShowForPlayer(playerid, Box[playerid]);}if(1000000 <= pInfo[playerid][pMoney] < 10000000){format(string, sizeof(string), \"$0%i\", pInfo[playerid][pMoney]);TextDrawSetString(Ft[playerid], string);TextDrawShowForPlayer(playerid, Ft[playerid]);TextDrawShowForPlayer(playerid, Box[playerid]);}if(10000000 <= pInfo[playerid][pMoney] < 999999999){format(string, sizeof(string), \"$%i\", pInfo[playerid][pMoney]);TextDrawSetString(Ft[playerid], string);TextDrawShowForPlayer(playerid, Ft[playerid]);TextDrawShowForPlayer(playerid, Box[playerid]);}return 1;}