Ramping Help
#1

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/ramping", cmdtext, true, 10) == 0)
    {
    if(Enabled[playerid] == 1)
    {SendClientMessage(playerid, 0xFFFF00FF, "Ramping disabled!");
     Enabled[playerid]=0;
     Pers[playerid]=0;
     return 1;
    }
    if(Enabled[playerid] == 0)
    {
        SendClientMessage(playerid, 0xFFFF00FF, "Ramping enabled!");
        SendClientMessage(playerid, 0xFFFF00FF, "Press CTRL or ALT GR start ramping!");
        SendClientMessage(playerid, 0xFF0000FF, "You've payed 75 000.");
        GivePlayerMoney(playerid, -75000);
        Enabled[playerid]=1;
        Pers[playerid]=1655;
        return 1;
    }
If the player doesn't have 75000 he can't ramp, cause when I try it turns to -75000, so if he has 75000 he can ramp?
Reply
#2

Are you meaning,


pawn Код:
if(GetPlayerMoney(playerid) < 75000) return SendClientMessage(playerid,0x008000AA, "You don't have enough money! You Need $75000!");
Reply
#3

where do I put that?
Reply
#4

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/ramping"cmdtexttrue10) == 0)
    {
        if(
GetPlayerMoney(playerid) < 75000)
        {
            
SendClientMessage(playerid,0x008000AA"You don't have enough money! You Need $75000!");
        }
        else
        {
        if(
Enabled[playerid] == 1)
        {
            
SendClientMessage(playerid0xFFFF00FF"Ramping disabled!");
             
Enabled[playerid]=0;
             
Pers[playerid]=0;
             return 
1;
        }
        if(
Enabled[playerid] == 0)
        {
            
SendClientMessage(playerid0xFFFF00FF"Ramping enabled!");
            
SendClientMessage(playerid0xFFFF00FF"Press CTRL or ALT GR start ramping!");
            
SendClientMessage(playerid0xFF0000FF"You've payed 75 000.");
            
GivePlayerMoney(playerid, -75000);
            
Enabled[playerid]=1;
            
Pers[playerid]=1655;
            return 
1;
        }
    }
    return 
1;

Reply
#5

Try this

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/ramping", cmdtext, true, 10) == 0)
    {
        if(GetPlayerMoney(playerid) < 75000)
        {
            SendClientMessage(playerid,0x008000AA, "You don't have enough money! You Need $75000!");
        }
        else
        {
        if(Enabled[playerid] == 1)
        {
            SendClientMessage(playerid, 0xFFFF00FF, "Ramping disabled!");
             Enabled[playerid]=0;
             Pers[playerid]=0;
             return 1;
        }
        if(Enabled[playerid] == 0)
        {
            SendClientMessage(playerid, 0xFFFF00FF, "Ramping enabled!");
            SendClientMessage(playerid, 0xFFFF00FF, "Press CTRL or ALT GR start ramping!");
            SendClientMessage(playerid, 0xFF0000FF, "You've payed 75 000.");
            GivePlayerMoney(playerid, -75000);
            Enabled[playerid]=1;
            Pers[playerid]=1655;
            return 1;
        }
    }
    return 1;
}
Edit: This guy up here was first.
Reply
#6

Thx guys worked well! I'm also have a problem in LuxAdmin, when I want to register or login nothing happens, it gives me the password box but even if i put my password I click Login/Register and nothing happens.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)