strcmp
#1

I want if player name is online tarnsfer the cash into player account bank but strcmp not working
why?

Code:
Dialog:DialogATM4(playerid, response, listitem, inputtext[])
{
	if(response)
	{
        new sb_string[256];
        new AmountPool = GetPVarInt(playerid, "atm_cash");
        if(User[playerid][pbank] > AmountPool)
        {
        GetPVarString(playerid, "atm_name_target", sb_string, sizeof(sb_string));
	LOOP(i)
	{
	    if(!strcmp(sb_string, GetName(i), false))
	    { If Online
            SendFormatedMessage(i,-1, "**"orange"Bazikon %s(%i) Moghdare "white"%i$ "orange"Rial Pool Be Hesab Banki Shoma Variz Kard!", GetName(playerid),playerid,AmountPool);
            PlayerPlaySound(i, 1057, 0.0, 0.0, 10.0);
	    User[i][pbank] += AmountPool;
	    }
	    else
	    { If Not Online
            new strb = SQL::GetIntEntryEx(""PLAYERS_TABLE"", "pbank", "username", sb_string);
            new handle = SQL::OpenEx(SQL::UPDATE, ""PLAYERS_TABLE"", "username", sb_string);
            SQL::WriteInt(handle, "pbank", strb+TargetATMCash[playerid]+AmountPool);
            SQL::Close(handle);
	    }
	}
        PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
	User[playerid][pbank] -= AmountPool;
	SendFormatedMessage(playerid, COLOR_ORANGE,"*Shoma Mablagh %i Pool Be Hesab Banki Bazikon %s Variz Kardid!",AmountPool,sb_string);
	
    } else return Error(playerid, "Shoma In Moghdar Pool Ra Dar Hesab Banki Khod Nadrid!");
    }
    return 1;
}
Reply


Messages In This Thread
strcmp - by Vizi10 - 18.01.2019, 10:13
Re: strcmp - by Kaliber - 18.01.2019, 11:00
Re: strcmp - by Vizi10 - 18.01.2019, 14:34

Forum Jump:


Users browsing this thread: 1 Guest(s)