Name somehow seems to pass !strcmp while not the same
#1

Hello,

I got a weird problem. While the 'Owner' in the file is set as 'Ashley Jennings' and I try to set the fee (my name is: Jeff Venturas) I can just do that. It just sees name as the same. Why is that?
pawn Код:
dcmd_parkfee(playerid,params[])
{
    new p = IsNearParkingLot(playerid);
    if(p != -1)
    {
        new Playername[MAX_PLAYER_NAME],filepl[30];
        GetPlayerRPName(playerid,Playername,sizeof(Playername));
        format(filepl,sizeof(filepl),"Stuff/ParkingLots/%d.ini",p);
        if(!strcmp(Playername,dini_Get(filepl,"Owner"),false))
        {
            new price;
            if(!sscanf(params,"d",price))
            {
                if(price >= 0 && price <= 100)
                {
                    new string[65];
                    ParkingLotInfo[p][Fee] = price;
                    dini_IntSet(filepl,"Fee",price);
                    format(string,sizeof(string),"  You have successfully changed the Parking Lot's Fee to $%d.",price);
                    SendClientMessage(playerid,COLOR_WHITE,string);
                    return 1;
                }
                else return SendClientMessage(playerid,COLOR_RED,"Maybe it is better to put a lower price or we get inflation...");
            }
            else return SendClientMessage(playerid,COLOR_RED,"Syntax Error: /parkfee [fee].");
        }
        else return SendClientMessage(playerid,COLOR_RED,"  You don't own this Parking Lot.");
    }
    else return SendClientMessage(playerid,COLOR_RED,"You are not near any Company.");
}
Hope to hear soon
Jochem
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)