SA-MP Forums Archive
Ramping Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Ramping Help (/showthread.php?tid=274106)



Ramping Help - XVK - 04.08.2011

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?


Re: Ramping Help - Shockey HD - 04.08.2011

Are you meaning,


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



Re: Ramping Help - XVK - 04.08.2011

where do I put that?


Re: Ramping Help - Kush - 04.08.2011

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;




Re: Ramping Help - Kingunit - 04.08.2011

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.


Re: Ramping Help - XVK - 04.08.2011

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.