Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Life

Pages: [1] 2
1
Very nice 👍

2
Implemented Suggestions / Re: Remove sniper reload
« on: March 30, 2023, 10:39:40 pm »
Idea 3 is pretty good  :)

3
PAWN Scripting / Re: Simple /setskin command
« on: March 12, 2023, 11:20:37 am »
Yea i know but why not add more colors

4
PAWN Scripting / Chatcolor command
« on: March 12, 2023, 11:19:23 am »
Hello today im gonna give you a simple chatcolor command that anyone can use.

// Color definitions
#define COLOR_WHITE     0xFFFFFFFF
#define COLOR_BLACK     0xFF000000
#define COLOR_RED       0xFFFF0000
#define COLOR_GREEN     0xFF00FF00
#define COLOR_BLUE      0xFF0000FF
#define COLOR_YELLOW    0xFFFFFF00
#define COLOR_ORANGE    0xFFFFA500
#define COLOR_PURPLE    0xFF800080
#define COLOR_PINK      0xFFFFC0CB
#define COLOR_CLAN      0xFF00FFFF

// Include definitions
#include <a_samp>
#include <sscanf2>
#include <zcmd>


#define COLOR_COMMAND "/color"
#define COLOR_USAGE "/color [color code] - Changes your chat color to the specified code."

// Chat color command
CMD:color(playerid, params[])
{
    new color = strval(params);

    if(!color || color < 0 || color > 9)
    {
        SendClientMessage(playerid, COLOR_RED, "Usage: %s", COLOR_USAGE);
        return 1;
    }

    SetPlayerChatBubbleColor(playerid, color);
    SendClientMessage(playerid, COLOR_GREEN, "Your chat color has been changed to %d.", color);
    return 1;
}

5
PAWN Scripting / Advanced Bank System.
« on: March 12, 2023, 10:59:22 am »
Hello today i will be giving you an advanced bank system.

// Define colors
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_YELLOW 0xFFFF00FF
#define COLOR_GREEN 0x00FF00FF
#define COLOR_RED 0xFF0000FF

// Define dialog IDs
#define DIALOG_ATM 1
#define DIALOG_BANK 2

// Define textdraw IDs
#define TEXTDRAW_BALANCE 1
#define TEXTDRAW_DEPOSIT 2
#define TEXTDRAW_WITHDRAW 3

// Define maximum account balance
#define MAX_BALANCE 1000000

// Include files
#include <a_samp>
#include <sscanf2>
#include <dialog>
#include <textdraw>

// Function to format money values
public format_money(value, output[], len)
{
    new whole = int(value);
    new frac = int((value - whole) * 100);
    format(output, len, "$%d.%02d", whole, frac);
    return 1;
}

// Command to open ATM dialog
CMD:atm(playerid)
{
    if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You are not connected to the server.");
   
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
   
    ShowPlayerDialog(playerid, DIALOG_ATM, DIALOG_STYLE_LIST, "ATM", "What would you like to do?", "View balance\nDeposit money\nWithdraw money\nCancel");
    return 1;
}

// Callback function for ATM dialog
public ATMDialog(playerid, response, listitem, inputtext[])
{
    if(response)
    {
        switch(listitem)
        {
            case 0: // View balance
                new Float:balance = GetPlayerScore(playerid);
                new msg[32];
                format_money(balance, msg, sizeof(msg));
                SendClientMessage(playerid, COLOR_GREEN, "Your current balance is:");
                SendClientMessage(playerid, COLOR_WHITE, msg);
                break;
           
            case 1: // Deposit money
                new Float:deposit;
                if(sscanf(inputtext, "f", deposit))
                {
                    if(deposit <= 0) return SendClientMessage(playerid, COLOR_RED, "Error: Invalid deposit amount.");
                    new Float:balance = GetPlayerScore(playerid);
                    if(balance + deposit > MAX_BALANCE) return SendClientMessage(playerid, COLOR_RED, "Error: You cannot deposit more than $1,000,000.");
                    GivePlayerScore(playerid, deposit);
                    new msg[64];
                    format_money(deposit, msg, sizeof(msg));
                    SendClientMessage(playerid, COLOR_GREEN, "You have deposited:");
                    SendClientMessage(playerid, COLOR_WHITE, msg);
                }
                else
                {
                    SendClientMessage(playerid, COLOR_RED, "Error: Invalid input.");
                }
                break;
           
            case 2: // Withdraw money
                new Float:withdraw;
                if(sscanf(inputtext, "f", withdraw))
                {
                    if(withdraw <= 0) return SendClientMessage(playerid, COLOR_RED, "Error: Invalid withdrawal amount.");
                    new Float:balance = GetPlayerScore(playerid);
                    if(balance - withdraw < 0) return SendClientMessage(playerid, COLOR_RED, "Error: Insufficient funds.");
                    TakePlayerScore(playerid, withdraw);
                    new msg[64];
                    format_money(withdraw, msg, sizeof(msg));
                    SendClientMessage(playerid, COLOR_GREEN, "You have withdrawn:");
                    SendClientMessage(playerid, COLOR_WHITE, msg);
}
else
{
SendClientMessage(playerid, COLOR_RED, "Error: Invalid input.");
}
break;
        default: // Cancel
            break;
    }
}
return 1;
}

// Command to open bank dialog
CMD:bank(playerid)
{
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You are not connected to the server.");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);

TextDrawShowForPlayer(playerid, TEXTDRAW_BALANCE);
TextDrawShowForPlayer(playerid, TEXTDRAW_DEPOSIT);
TextDrawShowForPlayer(playerid, TEXTDRAW_WITHDRAW);
ShowPlayerDialog(playerid, DIALOG_BANK, DIALOG_STYLE_LIST, "Bank", "What would you like to do?", "View balance\nDeposit money\nWithdraw money\nCancel");
return 1;
}

// Callback function for bank dialog
public BankDialog(playerid, response, listitem, inputtext[])
{
TextDrawHideForPlayer(playerid, TEXTDRAW_BALANCE);
TextDrawHideForPlayer(playerid, TEXTDRAW_DEPOSIT);
TextDrawHideForPlayer(playerid, TEXTDRAW_WITHDRAW);
if(response)
{
    switch(listitem)
    {
        case 0: // View balance
            new Float:balance = GetPlayerScore(playerid);
            new msg[32];
            format_money(balance, msg, sizeof(msg));
            SendClientMessage(playerid, COLOR_GREEN, "Your current balance is:");
            SendClientMessage(playerid, COLOR_WHITE, msg);
            break;
       
        case 1: // Deposit money
            new Float:deposit;
            if(sscanf(inputtext, "f", deposit))
            {
                if(deposit <= 0) return SendClientMessage(playerid, COLOR_RED, "Error: Invalid deposit amount.");
                new Float:balance = GetPlayerScore(playerid);
                if(balance + deposit > MAX_BALANCE) return SendClientMessage(playerid, COLOR_RED, "Error: You cannot deposit more than $1,000,000.");
                GivePlayerScore(playerid, deposit);
                new msg[64];
                format_money(deposit, msg, sizeof(msg));
                SendClientMessage(playerid, COLOR_GREEN, "You have deposited:");
                SendClientMessage(playerid, COLOR_WHITE, msg);
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "Error: Invalid input.");
            }
            break;
       
        case 2: // Withdraw money
            new Float:withdraw;
            if(sscanf(inputtext, "f", withdraw))
            {
                if(withdraw <= 0) return SendClientMessage(playerid, COLOR_RED, "Error: Invalid withdrawal amount.");
                new Float:balance = GetPlayerScore(playerid);
                if(balance - withdraw < 0) return SendClientMessage(playerid, COLOR_RED, "Error: Insufficient funds.");
                TakePlayerScore(playerid, withdraw);
                new msg[64];
                format_money(withdraw, msg, sizeof(msg));
                SendClientMessage(playerid, COLOR_GREEN, "You have withdrawn:");
                SendClientMessage(playerid, COLOR_WHITE, msg);
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "Error: Invalid input.");
            }
            break;
       
        default: // Cancel
            break;
    }
}
return 1;
}

// Initialize textdraws
public OnGameModeInit()
{
new Float:x, Float:y, Float:z;
x = 1462.07
y = -1045.89;
z = 24.1;
TEXTDRAW_BALANCE = TextDrawCreate(x + 0.05, y + 0.17, "$0");
TextDrawLetterSize(TEXTDRAW_BALANCE, 0.2, 1.0);
TextDrawTextSize(TEXTDRAW_BALANCE, 0.25, 1.0);
TextDrawAlignment(TEXTDRAW_BALANCE, 1);
TextDrawColor(TEXTDRAW_BALANCE, 0xFFFFFFFF);
TextDrawBackgroundColor(TEXTDRAW_BALANCE, 0x80000000);
TextDrawSetOutline(TEXTDRAW_BALANCE, 1);
TextDrawSetProportional(TEXTDRAW_BALANCE, 1);
TextDrawFont(TEXTDRAW_BALANCE, 3);

TEXTDRAW_DEPOSIT = TextDrawCreate(x + 0.05, y + 0.27, "Deposit money");
TextDrawLetterSize(TEXTDRAW_DEPOSIT, 0.2, 1.0);
TextDrawTextSize(TEXTDRAW_DEPOSIT, 0.25, 1.0);
TextDrawAlignment(TEXTDRAW_DEPOSIT, 1);
TextDrawColor(TEXTDRAW_DEPOSIT, 0xFFFFFFFF);
TextDrawBackgroundColor(TEXTDRAW_DEPOSIT, 0x80000000);
TextDrawSetOutline(TEXTDRAW_DEPOSIT, 1);
TextDrawSetProportional(TEXTDRAW_DEPOSIT, 1);
TextDrawFont(TEXTDRAW_DEPOSIT, 3);

TEXTDRAW_WITHDRAW = TextDrawCreate(x + 0.05, y + 0.37, "Withdraw money");
TextDrawLetterSize(TEXTDRAW_WITHDRAW, 0.2, 1.0);
TextDrawTextSize(TEXTDRAW_WITHDRAW, 0.25, 1.0);
TextDrawAlignment(TEXTDRAW_WITHDRAW, 1);
TextDrawColor(TEXTDRAW_WITHDRAW, 0xFFFFFFFF);
TextDrawBackgroundColor(TEXTDRAW_WITHDRAW, 0x80000000);
TextDrawSetOutline(TEXTDRAW_WITHDRAW, 1);
TextDrawSetProportional(TEXTDRAW_WITHDRAW, 1);
TextDrawFont(TEXTDRAW_WITHDRAW, 3);

return 1;
}

// Cleanup textdraws
public OnPlayerDisconnect(playerid, reason)
{
TextDrawDestroy(TEXTDRAW_BALANCE);
TextDrawDestroy(TEXTDRAW_DEPOSIT);
TextDrawDestroy(TEXTDRAW_WITHDRAW);
return 1;
}

There may be errors so if there are please reply the errors here.

6
PAWN Scripting / Firework system
« on: March 12, 2023, 10:48:52 am »
Hello today i will be giving you a firework system.

#include <a_samp>
#include <zcmd>

#define COLOR_RED 0xFF0000FF
#define COLOR_GREEN 0x00FF00FF
#define EXPLOSION_FIREWORK 18

// Command to create a fireworks show in the player's location
CMD:fireworks(playerid)
{
    // Get the player's position
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
   
    // Create fireworks
    for(new i = 0; i < 50; i++)
    {
        new fx = CreateExplosion(x + random(-10, 10), y + random(-10, 10), z + random(5, 50), EXPLOSION_FIREWORK, 0.0);
        SetTimerEx("DestroyFirework", 2000, false, "i", i);
    }
   
    // Send message to player
    SendClientMessage(playerid, COLOR_GREEN, "You have created a fireworks show in your location!");
    return 1;
}

// Function to destroy a firework after it explodes
public DestroyFirework(i)
{
    DestroyObject(i);
    return 1;
}

// Register the command with zcmd
public OnGameModeInit()
{
    RegisterZcmd("fireworks", "Create a fireworks show at your location.", ACCESS_PLAYER);
    return 1;
}

7
Russian / Re: Русский?
« on: March 12, 2023, 09:31:27 am »
Привет, как дела, парень?

8
PAWN Scripting / Simple ATM/Bank System
« on: March 12, 2023, 08:46:36 am »
Hello today i will be giving you s simple ATM/Bank System.

// ATM/bank system using zcmd

#include <zcmd>
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_RED 0xFF0000FF
#define COLOR_GREEN 0x00FF00FF
#define COLOR_YELLOW 0xFFFF00FF

// ATM positions (can be changed)
new Float:ATM_Pos[][3] =
{
    {123.4, 567.8, 9.0},
    {234.5, 678.9, 1.2},
    // add more ATMs as necessary
};

// Function to check if the player is near an ATM
stock IsPlayerNearATM(playerid)
{
    new Float:playerPos[3];
    GetPlayerPos(playerid, playerPos[0], playerPos[1], playerPos[2]);
    for(new i = 0; i < sizeof(ATM_Pos); i++)
    {
        if(GetDistanceBetweenPoints3D(playerPos[0], playerPos[1], playerPos[2], ATM_Pos[0], ATM_Pos[1], ATM_Pos[2]) < 1.5)
        {
            return i;
        }
    }
    return -1;
}

// Command to check player's account balance
CMD:checkbalance(playerid)
{
    new balance = GetPlayerMoney(playerid);
    SendClientMessage(playerid, COLOR_YELLOW, "Your balance is: $%d", balance);
    return 1;
}

// Command to deposit money into player's account
CMD:deposit(playerid, params[])
{
    new amount = strval(params);
    if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You are not connected to the server.");
    if(amount < 0) return SendClientMessage(playerid, COLOR_RED, "Error: Invalid amount.");
   
    new atmID = IsPlayerNearATM(playerid);
    if(atmID == -1) return SendClientMessage(playerid, COLOR_RED, "Error: You are not near an ATM.");
   
    if(GetPlayerMoney(playerid) < amount) return SendClientMessage(playerid, COLOR_RED, "Error: Insufficient funds.");
   
    SetPlayerMoney(playerid, GetPlayerMoney(playerid) - amount);
    SetPlayerMoneyInAccount(playerid, amount);
GetPlayerMoneyInAccount(playerid, atmID);
return 1;
}

// Command to withdraw money from player's account
CMD:withdraw(playerid, params[])
{
new amount = strval(params);
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You are not connected to the server.");
if(amount < 0) return SendClientMessage(playerid, COLOR_RED, "Error: Invalid amount.");
new atmID = IsPlayerNearATM(playerid);
if(atmID == -1) return SendClientMessage(playerid, COLOR_RED, "Error: You are not near an ATM.");

if(GetPlayerMoneyInAccount(playerid, atmID) < amount) return SendClientMessage(playerid, COLOR_RED, "Error: Insufficient funds.");

SetPlayerMoney(playerid, GetPlayerMoney(playerid) + amount);
SetPlayerMoneyInAccount(playerid, GetPlayerMoneyInAccount(playerid, atmID)
SendClientMessage(playerid, COLOR_GREEN, "You have withdrawn $%d from your account.", amount);
return 1;
}

// Command to transfer money from player's account to another player's account
CMD:transfer(playerid, params[])
{
new amount, recipientid;
sscanf(params, "ud", amount, recipientid);
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You are not connected to the server.");
if(amount < 0) return SendClientMessage(playerid, COLOR_RED, "Error: Invalid amount.");
if(!IsPlayerConnected(recipientid))
return SendClientMessage(playerid, COLOR_RED, "Error: The recipient is not connected to the server.");
if(playerid == recipientid) return SendClientMessage(playerid, COLOR_RED, "Error: You cannot transfer money to yourself.");
new atmID = IsPlayerNearATM(playerid);
if(atmID == -1) return SendClientMessage(playerid, COLOR_RED, "Error: You are not near an ATM.");

if(GetPlayerMoneyInAccount(playerid, atmID) < amount) return SendClientMessage(playerid, COLOR_RED, "Error: Insufficient funds.");

SetPlayerMoneyInAccount(playerid, GetPlayerMoneyInAccount(playerid, atmID) - amount, atmID);
SetPlayerMoneyInAccount(recipientid, GetPlayerMoneyInAccount(recipientid, atmID) + amount, atmID);
SendClientMessage(playerid, COLOR_GREEN, "You have transferred $%d to player %d's account.", amount, recipientid);
SendClientMessage(recipientid, COLOR_GREEN, "Player %d has transferred $%d to your account.", playerid, amount);
return 1;
}

If you find any errors please let me know

9
PAWN Scripting / Re: Simple /setmoney and /givemoeny command
« on: March 11, 2023, 09:19:01 am »
go to the samp website download a server go to pawno and make a new pawnno file and copy and paste the code then press compile

Kepp in mind that you need 1 include and 1 plugin the plugin name is sscanf and the include name is zcmd.

10
PAWN Scripting / Simple /setmoney and /givemoeny command
« on: March 11, 2023, 09:13:30 am »
/setmoney and /givemoney command that anyone can use!

#include <a_samp>
#include <zcmd>
#include <sscanf2>

#define COLOR_WHITE 0xFFFFFF
#define COLOR_BLACK 0x000000
#define COLOR_RED 0xFF0000
#define COLOR_GREEN 0x00FF00
#define COLOR_BLUE 0x0000FF
#define COLOR_YELLOW 0xFFFF00
#define COLOR_ORANGE 0xFFA500
#define COLOR_PURPLE 0x800080

CMD:setmoney(playerid, params[])
{
    new money = strval(params);
    if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You are not connected to the server.");
    if(money < 0) return SendClientMessage(playerid, COLOR_RED, "Error: Invalid amount.");
   
    SetPlayerMoney(playerid, money);
    SendClientMessage(playerid, COLOR_GREEN, "Success: Your money has been set to $%d.", money);
    return 1;
}

CMD:givemoney(playerid, params[])
{
    new money = strval(params);
    if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You are not connected to the server.");
    if(money < 0) return SendClientMessage(playerid, COLOR_RED, "Error: Invalid amount.");
   
    GivePlayerMoney(playerid, money);
    SendClientMessage(playerid, COLOR_GREEN, "Success: You have been given $%d.", money);
    return 1;
}


If there are any errors please let me know.

11
PAWN Scripting / Simple /setskin command
« on: March 11, 2023, 09:05:22 am »
Hello today i will be giving you a simple /setskin command that anyone can use.

#include <a_samp>
#include <zcmd>
#include <sscanf2>

#define COLOR_WHITE 0xFFFFFF
#define COLOR_BLACK 0x000000
#define COLOR_RED 0xFF0000
#define COLOR_GREEN 0x00FF00
#define COLOR_BLUE 0x0000FF
#define COLOR_YELLOW 0xFFFF00
#define COLOR_ORANGE 0xFFA500
#define COLOR_PURPLE 0x800080

CMD:setskin(playerid, params[])
{
    new skinid = strval(params);
    if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You are not connected to the server.");
    if(skinid < 0 || skinid > 311) return SendClientMessage(playerid, COLOR_RED, "Error: Invalid skin ID.");
   
    SetPlayerSkin(playerid, skinid);
    SendClientMessage(playerid, COLOR_GREEN, "Success: Your skin has been changed!");
    return 1;
}

12
Videos / Re: worst driving decision of my life
« on: March 11, 2023, 08:59:48 am »
Damn :(

13
Rejected Suggestions / Re: 2x weekly server bonus
« on: February 26, 2023, 01:30:07 pm »
This actually a nice idea +1 👍

14
Very nice idea +1 👍

15
Approved Suggestions / Re: Industrial Vehicles Vendor
« on: February 19, 2023, 09:06:10 pm »
Nice idea +1 👍

16
Rejected Suggestions / Re: Do something about cops
« on: February 19, 2023, 09:03:42 pm »
Good idea +1 👍

17
Rejected Suggestions / Re: Firefighter Job
« on: February 14, 2023, 07:33:55 pm »
Okay Mr.Mike

18
Rejected Suggestions / Firefighter Job
« on: February 13, 2023, 10:11:34 pm »
I suggest that you add more job events for firefighters or increase the chance that a job event hapens.
It would be nice if there are more events like burning cars, NPC's and others.Like burning houses inside

19
Unofficial crews / Re: [HC]Holy Cow
« on: February 12, 2023, 02:34:45 am »
@Daryl_Dixon What do you mean until full reply?

20
Unofficial crews / Re: [HC]Holy Cow
« on: February 10, 2023, 08:56:40 pm »
 1.Your MCNR name:[L]ife
 2.Your Score:8436
 3.Reason you want to join this crew:Life needs to be holy of course so it doesn't die. And the crew is cool
 4 Have you been banned before (if yes please specify the reason):never
 5.Do u have any infractions (if yes please tell us):never
 6.Were u a member of any crew before(if yes then tell us its name):never
 7.Your Discord ID:The Noob#2488

Pages: [1] 2