Jump to content
  • 0

Problema Script Borrow Bank


MaRiJuAnA

Question

Am facut un mic script de borrow, dar cand vreau sa-l compilez nu se intampla nimic, imi scrie pur si simplu asta "Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase"

[pawn]enum pInfo

pImprumut,

pImprumut1,

pImprumut2,

pImprumut3,

pImprumut4,

pImprumut5,

pImprumut6,

pImprumut7,

public OnPlayerConnect(playerid)

PlayerInfo[playerid][pImprumut] = 0;

PlayerInfo[playerid][pImprumut1] = 0;

PlayerInfo[playerid][pImprumut2] = 0;

PlayerInfo[playerid][pImprumut3] = 0;

PlayerInfo[playerid][pImprumut4] = 0;

PlayerInfo[playerid][pImprumut5] = 0;

PlayerInfo[playerid][pImprumut6] = 0;

PlayerInfo[playerid][pImprumut7] = 0;

public OnPlayerRegister(playerid, password[])

  format(var, 32, "Imprumutat=%d\n",PlayerInfo[playerid][pImprumut]);fwrite(hFile, var);

  format(var, 32, "Imprumutat1=%d\n",PlayerInfo[playerid][pImprumut1]);fwrite(hFile, var);

  format(var, 32, "Imprumutat2=%d\n",PlayerInfo[playerid][pImprumut2]);fwrite(hFile, var);

  format(var, 32, "Imprumutat3=%d\n",PlayerInfo[playerid][pImprumut3]);fwrite(hFile, var);

  format(var, 32, "Imprumutat4=%d\n",PlayerInfo[playerid][pImprumut4]);fwrite(hFile, var);

  format(var, 32, "Imprumutat5=%d\n",PlayerInfo[playerid][pImprumut5]);fwrite(hFile, var);

  format(var, 32, "Imprumutat6=%d\n",PlayerInfo[playerid][pImprumut6]);fwrite(hFile, var);

  format(var, 32, "Imprumutat7=%d\n",PlayerInfo[playerid][pImprumut7]);fwrite(hFile, var);

public SavePlayerData(playerid)

format(var, 32, "Imprumutat=%d\n",PlayerInfo[playerid][pImprumut]);fwrite(hFile, var);

format(var, 32, "Imprumutat1=%d\n",PlayerInfo[playerid][pImprumut1]);fwrite(hFile, var);

  format(var, 32, "Imprumutat2=%d\n",PlayerInfo[playerid][pImprumut2]);fwrite(hFile, var);

  format(var, 32, "Imprumutat3=%d\n",PlayerInfo[playerid][pImprumut3]);fwrite(hFile, var);

  format(var, 32, "Imprumutat4=%d\n",PlayerInfo[playerid][pImprumut4]);fwrite(hFile, var);

  format(var, 32, "Imprumutat5=%d\n",PlayerInfo[playerid][pImprumut5]);fwrite(hFile, var);

  format(var, 32, "Imprumutat6=%d\n",PlayerInfo[playerid][pImprumut6]);fwrite(hFile, var);

  format(var, 32, "Imprumutat7=%d\n",PlayerInfo[playerid][pImprumut7]);fwrite(hFile, var);

public OnPlayerLogin(playerid,password[])

                    if( strcmp( key , "Imprumut" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut] = strval( val ); }

                    if( strcmp( key , "Imprumut1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut1] = strval( val ); }

                    if( strcmp( key , "Imprumut2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut2] = strval( val ); }

                    if( strcmp( key , "Imprumut3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut3] = strval( val ); }

                    if( strcmp( key , "Imprumut4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut4] = strval( val ); }

                    if( strcmp( key , "Imprumut5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut5] = strval( val ); }

                    if( strcmp( key , "Imprumut6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut6] = strval( val ); }

                    if( strcmp( key , "Imprumut7" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut7] = strval( val ); }

OnPlayerCommandText

//    BORROW

    if(strcmp(cmd, "/borrow", true) == 0) // By marijuana

    {

            if(PlayerInfo[playerid][pImprumut] == 1)

            {

SendClientMessage(playerid, COLOR_WHITE, "Use The Next Commands To Borrow From The Bank");

SendClientMessage(playerid, COLOR_WHITE, "/Borrow1000");

SendClientMessage(playerid, COLOR_WHITE, "/Borrow5000");

SendClientMessage(playerid, COLOR_WHITE, "/Borrow10000");

SendClientMessage(playerid, COLOR_WHITE, "/Borrow25000");

SendClientMessage(playerid, COLOR_WHITE, "/Borrow50000");

SendClientMessage(playerid, COLOR_WHITE, "/Borrow75000");

SendClientMessage(playerid, COLOR_WHITE, "/Borrow100000");

            }

            else

            {

SendClientMessage(playerid, COLOR_GREY, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again.");

return 1;

            }

        }

        return 1;

    }

    if(strcmp(cmd, "/borrow1000", true) == 0) // By marijuana

    {

            if(PlayerInfo[playerid][pImprumut] == 1)

            {

            GivePlayerMoney(playerid, 1000);

            SendClientMassage(playerid, COLOR_WHITE, "You Borrowed 1000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp");

            PlayerInfo[playerid][pImprumut] = 1;

            PlayerInfo[playerid][pImprumut1] = 1;

}

else

{

SendClientMessage(playerid, COLOR_GREY, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again.");

return 1;

}

}

return 1;

}

    if(strcmp(cmd, "/borrow5000", true) == 0) // By marijuana

    {

            if(PlayerInfo[playerid][pImprumut] == 1)

            {

            GivePlayerMoney(playerid, 5000);

            SendClientMassage(playerid, COLOR_WHITE, "You Borrowed 5000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp");

            PlayerInfo[playerid][pImprumut] = 1;

            PlayerInfo[playerid][pImprumut2] = 1;

}

else

{

SendClientMessage(playerid, COLOR_GREY, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again.");

return 1;

}

}

return 1;

}

    if(strcmp(cmd, "/borrow10000", true) == 0) // By marijuana

    {

            if(PlayerInfo[playerid][pImprumut] == 1)

            {

            GivePlayerMoney(playerid, 10000);

            SendClientMassage(playerid, COLOR_WHITE, "You Borrowed 10000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp");

            PlayerInfo[playerid][pImprumut] = 1;

            PlayerInfo[playerid][pImprumut3] = 1;

}

else

{

SendClientMessage(playerid, COLOR_GREY, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again.");

return 1;

}

}

return 1;

}

    if(strcmp(cmd, "/borrow25000", true) == 0) // By marijuana

    {

            if(PlayerInfo[playerid][pImprumut] == 1)

            {

            GivePlayerMoney(playerid, 25000);

            SendClientMassage(playerid, COLOR_WHITE, "You Borrowed 25000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp");

            PlayerInfo[playerid][pImprumut] = 1;

            PlayerInfo[playerid][pImprumut4] = 1;

}

else

{

SendClientMessage(playerid, COLOR_GREY, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again.");

return 1;

}

}

return 1;

}

    if(strcmp(cmd, "/borrow50000", true) == 0) // By marijuana

    {

            if(PlayerInfo[playerid][pImprumut] == 1)

            {

            GivePlayerMoney(playerid, 50000);

            SendClientMassage(playerid, COLOR_WHITE, "You Borrowed 50000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp");

            PlayerInfo[playerid][pImprumut] = 1;

            PlayerInfo[playerid][pImprumut5] = 1;

}

else

{

SendClientMessage(playerid, COLOR_GREY, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again.");

return 1;

}

}

return 1;

}

    if(strcmp(cmd, "/borrow75000", true) == 0) // By marijuana

    {

            if(PlayerInfo[playerid][pImprumut] == 1)

            {

            GivePlayerMoney(playerid, 75000);

            SendClientMassage(playerid, COLOR_WHITE, "You Borrowed 75000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp");

            PlayerInfo[playerid][pImprumut] = 1;

            PlayerInfo[playerid][pImprumut6] = 1;

}

else

{

SendClientMessage(playerid, COLOR_GREY, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again.");

return 1;

}

}

return 1;

}

    if(strcmp(cmd, "/borrow100000", true) == 0) // By marijuana

    {

            if(PlayerInfo[playerid][pImprumut] == 1)

            {

            GivePlayerMoney(playerid, 100000);

            SendClientMassage(playerid, COLOR_WHITE, "You Borrowed 100000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp");

            PlayerInfo[playerid][pImprumut] = 1;

            PlayerInfo[playerid][pImprumut7] = 1;

}

else

{

SendClientMessage(playerid, COLOR_GREY, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again.");

return 1;

}

}

return 1;

}

//PAYAMOUNT

if(strcmp(cmd, "/PayAmountBack", true) == 0) // By marijuana

    {

    if(PlayerInfo[playerid][pImprumut1] == 1)

    {

        if(PlayerInfo[playerid][pImprumut2] == 1)

    {

        if(PlayerInfo[playerid][pImprumut3] == 1)

    {

        if(PlayerInfo[playerid][pImprumut4] == 1)

{

    if(PlayerInfo[playerid][pImprumut5] == 1)

    {

        if(PlayerInfo[playerid][pImprumut6] == 1)

    {

        if(PlayerInfo[playerid][pImprumut7] == 1)

{

SendClientMessage(playerid, COLOR_WHITE, "You are about to pay your debt to the bank);

}

else

{

GivePlayerMoney(playerid, -1000);

SendClientMassage(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp.");

PlayerInfo[playerid][pImprumut] = 0;

PlayerInfo[playerid][pImprumut1] = 0;

}

return 1;

}

else

{

GivePlayerMoney(playerid, -5000);

SendClientMassage(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp.");

PlayerInfo[playerid][pImprumut] = 0;

PlayerInfo[playerid][pImprumut2] = 0;

}

return 1;

}

else

{

GivePlayerMoney(playerid, -10000);

SendClientMassage(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp.");

PlayerInfo[playerid][pImprumut] = 0;

PlayerInfo[playerid][pImprumut3] = 0;

}

return 1;

}

else

{

GivePlayerMoney(playerid, -25000);

SendClientMassage(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp.");

PlayerInfo[playerid][pImprumut] = 0;

PlayerInfo[playerid][pImprumut4] = 0;

}

return 1;

}

else

{

GivePlayerMoney(playerid, -50000);

SendClientMassage(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp.");

PlayerInfo[playerid][pImprumut] = 0;

PlayerInfo[playerid][pImprumut5] = 0;

}

return 1;

}

else

{

GivePlayerMoney(playerid, -75000);

SendClientMassage(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp.");

PlayerInfo[playerid][pImprumut] = 0;

PlayerInfo[playerid][pImprumut6] = 0;

}

return 1;

}

else

{

GivePlayerMoney(playerid, -100000);

SendClientMassage(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp.");

PlayerInfo[playerid][pImprumut] = 0;

PlayerInfo[playerid][pImprumut7] = 0;

return 1;

}

}

return 1;

}[/pawn]

Asta este ce-am facut, daca observati vreo eroare, sau ceva, da-ti un reply :D

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

Stai 10 -15 minunte ca iti rezolv eu scriptul.

Link:


#include <a_samp>

#define COLOR_WHITE             									0xFFFFFFFF
#define COLOR_ORANGE                								0xFF8000FF

#define SCM SendClientMessage

#define FILTERSCRIPT

forward OnPlayerRegister	(	playerid	, password	[	]	)	;
forward SavePlayerData	(	playerid	)	;
forward OnPlayerLogin	(	playerid	,	password	[	]	)	;
//==============================================================================
public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}
//==============================================================================
public OnFilterScriptExit()
{
	return 1;
}
//==============================================================================
enum pInfo
{
    iKey,
	pImprumut,
	pImprumut1,
	pImprumut2,
	pImprumut3,
	pImprumut4,
	pImprumut5,
	pImprumut6,
	pImprumut7
};
new PlayerInfo	[	MAX_PLAYERS	]	[	pInfo	]	;
//==============================================================================
forward CKLog	(	string	[	]	)	;
public CKLog	(	string	[	]	)
{
	new entry[256];
	format(entry, sizeof(entry), "%s\n",string);
	new File:hFile;
	hFile = fopen("Logs/ck.log", io_append);
	fwrite(hFile, entry);
	fclose(hFile);
}
//==============================================================================
forward ini_GetValue( line[] )	;
stock ini_GetValue( line[] ) {
	new valRes[256];
	valRes[0]=0;
	if ( strfind( line , "=" , true ) == -1 ) return valRes;
	strmid( valRes , line , strfind( line , "=" , true )+1 , strlen( line ) , sizeof( valRes ) );
	return valRes; }
//==============================================================================
forward ini_GetKey( line[] )	;
stock ini_GetKey( line[] ) {
	new keyRes[256];
	keyRes[0] = 0;
    if ( strfind( line , "=" , true ) == -1 ) return keyRes;
    strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) );
    return keyRes; }
//==============================================================================

public OnPlayerConnect(playerid)
{
	PlayerInfo[playerid][pImprumut] = 0;
	PlayerInfo[playerid][pImprumut1] = 0;
	PlayerInfo[playerid][pImprumut2] = 0;
	PlayerInfo[playerid][pImprumut3] = 0;
	PlayerInfo[playerid][pImprumut4] = 0;
	PlayerInfo[playerid][pImprumut5] = 0;
	PlayerInfo[playerid][pImprumut6] = 0;
	PlayerInfo[playerid][pImprumut7] = 0;
	return 1;
}

public OnPlayerRegister(playerid, password[])
{
	new string3[32];
	new var[32];
	new playername3[MAX_PLAYER_NAME];
	GetPlayerName(playerid, playername3, sizeof(playername3));
	format(string3, sizeof(string3), "Inprumuturi/%s.ini", playername3);
	new File: hFile = fopen(string3, io_write);
	if (hFile)
	{
		format(var, 32, "Imprumutat=%d\n",PlayerInfo[playerid][pImprumut]);fwrite(hFile, var);
		format(var, 32, "Imprumutat1=%d\n",PlayerInfo[playerid][pImprumut1]);fwrite(hFile, var);
		format(var, 32, "Imprumutat2=%d\n",PlayerInfo[playerid][pImprumut2]);fwrite(hFile, var);
		format(var, 32, "Imprumutat3=%d\n",PlayerInfo[playerid][pImprumut3]);fwrite(hFile, var);
		format(var, 32, "Imprumutat4=%d\n",PlayerInfo[playerid][pImprumut4]);fwrite(hFile, var);
		format(var, 32, "Imprumutat5=%d\n",PlayerInfo[playerid][pImprumut5]);fwrite(hFile, var);
		format(var, 32, "Imprumutat6=%d\n",PlayerInfo[playerid][pImprumut6]);fwrite(hFile, var);
		format(var, 32, "Imprumutat7=%d\n",PlayerInfo[playerid][pImprumut7]);fwrite(hFile, var);
	}
	return 1;
}

public SavePlayerData(playerid)
{
    new string3[32];
	new var[32];
	new playername3[MAX_PLAYER_NAME];
	GetPlayerName(playerid, playername3, sizeof(playername3));
	format(string3, sizeof(string3), "Inprumuturi/%s.ini", playername3);
	new File: hFile = fopen(string3, io_write);
	if (hFile)
	{
		format(var, 32, "Imprumutat=%d\n",PlayerInfo[playerid][pImprumut]);fwrite(hFile, var);
		format(var, 32, "Imprumutat1=%d\n",PlayerInfo[playerid][pImprumut1]);fwrite(hFile, var);
		format(var, 32, "Imprumutat2=%d\n",PlayerInfo[playerid][pImprumut2]);fwrite(hFile, var);
		format(var, 32, "Imprumutat3=%d\n",PlayerInfo[playerid][pImprumut3]);fwrite(hFile, var);
		format(var, 32, "Imprumutat4=%d\n",PlayerInfo[playerid][pImprumut4]);fwrite(hFile, var);
		format(var, 32, "Imprumutat5=%d\n",PlayerInfo[playerid][pImprumut5]);fwrite(hFile, var);
		format(var, 32, "Imprumutat6=%d\n",PlayerInfo[playerid][pImprumut6]);fwrite(hFile, var);
		format(var, 32, "Imprumutat7=%d\n",PlayerInfo[playerid][pImprumut7]);fwrite(hFile, var);
	}
	return 1;
}
   				

public OnPlayerLogin(playerid,password[])
{
    new string2[64];
	new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
	format(string2, sizeof(string2), "Users/%s.ini", playername2);
	new File: UserFile = fopen(string2, io_read);
	if ( UserFile )
	{
	    new PassData[256];
	    new keytmp[256], valtmp[256];
	    fread( UserFile , PassData , sizeof( PassData ) );
	    keytmp = ini_GetKey( PassData );
	    if( strcmp( keytmp , "Key" , true ) == 0 )
		{
			valtmp = ( PassData );
			strmid(PlayerInfo[playerid][iKey], valtmp, 0, strlen(valtmp)-1, 255);
		}
		if(strcmp(PlayerInfo[playerid][iKey],password, true ) == 0 )
		{
			new Data[ 256 ] , key[512] , val[512] ;
			if( strcmp( key , "Imprumut" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut] = strval( val ); }
			if( strcmp( key , "Imprumut1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut1] = strval( val ); }
			if( strcmp( key , "Imprumut2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut2] = strval( val ); }
			if( strcmp( key , "Imprumut3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut3] = strval( val ); }
			if( strcmp( key , "Imprumut4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut4] = strval( val ); }
			if( strcmp( key , "Imprumut5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut5] = strval( val ); }
			if( strcmp( key , "Imprumut6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut6] = strval( val ); }
			if( strcmp( key , "Imprumut7" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut7] = strval( val ); }
		}
	}
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[512];
    if(strcmp(cmd, "/borrow", true) == 0) // By marijuana
    {
		if(PlayerInfo[playerid][pImprumut] == 1)
		{
			SendClientMessage(playerid, COLOR_WHITE, "Use The Next Commands To Borrow From The Bank");
			SendClientMessage(playerid, COLOR_WHITE, "/Borrow1000");
			SendClientMessage(playerid, COLOR_WHITE, "/Borrow5000");
			SendClientMessage(playerid, COLOR_WHITE, "/Borrow10000");
			SendClientMessage(playerid, COLOR_WHITE, "/Borrow25000");
			SendClientMessage(playerid, COLOR_WHITE, "/Borrow50000");
			SendClientMessage(playerid, COLOR_WHITE, "/Borrow75000");
			SendClientMessage(playerid, COLOR_WHITE, "/Borrow100000");
		}
  		else
    	{
			SendClientMessage(playerid, COLOR_ORANGE, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again.");
			return 1;
		}
		return 1;
    }
    if(strcmp(cmd, "/borrow1000", true) == 0) // By marijuana
    {
		if(PlayerInfo[playerid][pImprumut] == 1)
  		{
            GivePlayerMoney(playerid, 1000);
            SCM(playerid, COLOR_WHITE, "You Borrowed 1000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp");
            PlayerInfo[playerid][pImprumut] = 1;
            PlayerInfo[playerid][pImprumut1] = 1;
		}
		else
		{
			SendClientMessage(playerid, COLOR_ORANGE, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again.");
			return 1;
		}
		return 1;
 	}
	if(strcmp(cmd, "/borrow5000", true) == 0) // By marijuana
    {
		if(PlayerInfo[playerid][pImprumut] == 1)
		{
            GivePlayerMoney(playerid, 5000);
            SCM(playerid, COLOR_WHITE, "You Borrowed 5000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp");
            PlayerInfo[playerid][pImprumut] = 1;
            PlayerInfo[playerid][pImprumut2] = 1;
		}
		else
		{
			SendClientMessage(playerid, COLOR_ORANGE, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again.");
			return 1;
		}
		return 1;
 	}
	if(strcmp(cmd, "/borrow10000", true) == 0) // By marijuana
    {
		if(PlayerInfo[playerid][pImprumut] == 1)
		{
            GivePlayerMoney(playerid, 10000);
            SCM(playerid, COLOR_WHITE, "You Borrowed 10000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp");
            PlayerInfo[playerid][pImprumut] = 1;
            PlayerInfo[playerid][pImprumut3] = 1;
		}
		else
		{
			SendClientMessage(playerid, COLOR_ORANGE, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again.");
			return 1;
		}
		return 1;
 	}
	if(strcmp(cmd, "/borrow25000", true) == 0) // By marijuana
    {
		if(PlayerInfo[playerid][pImprumut] == 1)
		{
            GivePlayerMoney(playerid, 25000);
            SCM(playerid, COLOR_WHITE, "You Borrowed 25000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp");
            PlayerInfo[playerid][pImprumut] = 1;
            PlayerInfo[playerid][pImprumut4] = 1;
		}
		else
		{
			SendClientMessage(playerid, COLOR_ORANGE, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again.");
			return 1;
		}
		return 1;
 	}
	if(strcmp(cmd, "/borrow50000", true) == 0) // By marijuana
    {
		if(PlayerInfo[playerid][pImprumut] == 1)
		{
            GivePlayerMoney(playerid, 50000);
            SCM(playerid, COLOR_WHITE, "You Borrowed 50000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp");
            PlayerInfo[playerid][pImprumut] = 1;
            PlayerInfo[playerid][pImprumut5] = 1;
		}
		else
		{
			SendClientMessage(playerid, COLOR_ORANGE, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again.");
			return 1;
		}
		return 1;
 	}
	if(strcmp(cmd, "/borrow75000", true) == 0) // By marijuana
    {
		if(PlayerInfo[playerid][pImprumut] == 1)
		{
            GivePlayerMoney(playerid, 75000);
            SCM(playerid, COLOR_WHITE, "You Borrowed 75000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp");
            PlayerInfo[playerid][pImprumut] = 1;
            PlayerInfo[playerid][pImprumut6] = 1;
		}
		else
		{
			SendClientMessage(playerid, COLOR_ORANGE, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again.");
			return 1;
		}
		return 1;
 	}
	if(strcmp(cmd, "/borrow100000", true) == 0) // By marijuana
    {
		if(PlayerInfo[playerid][pImprumut] == 1)
		{
            GivePlayerMoney(playerid, 100000);
            SCM(playerid, COLOR_WHITE, "You Borrowed 100000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp");
            PlayerInfo[playerid][pImprumut] = 1;
            PlayerInfo[playerid][pImprumut7] = 1;
		}
		else
		{
			SendClientMessage(playerid, COLOR_ORANGE, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again.");
			return 1;
		}
		return 1;
 	}
	if(strcmp(cmd, "/PayAmountBack", true) == 0) // By marijuana
    {
    	if(PlayerInfo[playerid][pImprumut1] == 1)
    	{
    	    if(PlayerInfo[playerid][pImprumut2] == 1)
			{
				if(PlayerInfo[playerid][pImprumut3] == 1)
    			{
    				if(PlayerInfo[playerid][pImprumut4] == 1)
					{
						if(PlayerInfo[playerid][pImprumut5] == 1)
						{
    						if(PlayerInfo[playerid][pImprumut6] == 1)
    						{
    							if(PlayerInfo[playerid][pImprumut7] == 1)
								{
									SendClientMessage(playerid, COLOR_WHITE, "You are about to pay your debt to the bank");
								}
								else
								{
									GivePlayerMoney(playerid, -1000);
									SCM(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp.");
									PlayerInfo[playerid][pImprumut] = 0;
									PlayerInfo[playerid][pImprumut1] = 0;
									return 1;
								}
								else
								{
									GivePlayerMoney(playerid, -5000);
									SCM(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp.");
									PlayerInfo[playerid][pImprumut] = 0;
									PlayerInfo[playerid][pImprumut2] = 0;
									return 1;
								}
								else
								{
									GivePlayerMoney(playerid, -10000);
									SCM(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp.");
									PlayerInfo[playerid][pImprumut] = 0;
									PlayerInfo[playerid][pImprumut3] = 0;
									return 1;
								}
								else
								{
									GivePlayerMoney(playerid, -25000);
									SCM(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp.");
									PlayerInfo[playerid][pImprumut] = 0;
									PlayerInfo[playerid][pImprumut4] = 0;
									return 1;
								}
								else
								{
									GivePlayerMoney(playerid, -50000);
									SCM(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp.");
									PlayerInfo[playerid][pImprumut] = 0;
									PlayerInfo[playerid][pImprumut5] = 0;
									return 1;
								}
								else
								{
									GivePlayerMoney(playerid, -75000);
									SCM(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp.");
									PlayerInfo[playerid][pImprumut] = 0;
									PlayerInfo[playerid][pImprumut6] = 0;
									return 1;
								}
								else
								{
									GivePlayerMoney(playerid, -100000);
									SCM(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp.");
									PlayerInfo[playerid][pImprumut] = 0;
									PlayerInfo[playerid][pImprumut7] = 0;
									return 1;
								}
							}
						}
					}
				}
			}
		}
	}
	return 0;
}

LISTA - GAMEMODE-URI SA-MP - Le gasiti pe toate aici: http://twiriock.com/3MGP

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.