Command no work
#1

Hello guys.

I have a problem with a command on my server when i use this command /comprarcarro ( /buycar ) command does nothing

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
new 
string[128];
if (
strcmp(cmdtext"/comprarcarro"true) == 0)
{
    new 
VehicleID;
    
VehicleID GetPlayerVehicleID(playerid);
    new 
pname[MAX_PLAYER_NAME];
    new 
aname[MAX_PLAYER_NAME];
    new 
file[128];
    
GetPlayerName(playeridanamesizeof(aname));
    
GetPlayerName(playeridpnamesizeof(pname));
    
format(filesizeof(file), "Contas/%s.ini"aname);
    for (new 
carro 0carro MAX_VEHICLEScarro++)
    {
    
format(stringsizeof(string), "carro%d.ini"carro);
    if (
strfind(pname,dini_Get(string,"Dono"),true) == 0)
    {
        
SendClientMessage(playerid, -1"Vocк jб tem um carro");
        return 
1;
    }
    if (
IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleSeat(playerid) == && VehicleID == dini_Int(string"Id"))
        {
            if (
dini_Int(string"TDono") == 1) return SendClientMessage(playerid, -1"Esse Carro jб tem dono!");
            if (
GetPlayerMoney(playerid) >= dini_Int(string"Preco"))
            {
                
GetPlayerName(playeridanameMAX_PLAYER_NAME);
                
dini_IntSet(string"TDono"1);
                
dini_Set(string"Dono"aname);
                
SendClientMessage(playerid, -1"(INFO) Veiculo comprado com sucesso!");
                
SendClientMessage(playerid, -1"(INFO) Para ver os comandos do veiculo, use: /meucarro");
                
GivePlayerMoney(playerid, -dini_Int(string"Preco"));
                
TogglePlayerControllable(playerid3);
                return 
1;
            } else {
                
SendClientMessage(playerid, -1"(ERRO) Vocк nгo tem dinheiro suficiente!");
                return 
1;
            }
        }
    }
    return 
1;
}
return 
0;

Reply


Messages In This Thread
Command no work - by brunoboy - 09.05.2013, 21:46
Re: Command no work - by NoahF - 09.05.2013, 21:47
Re: Command no work - by Konewka - 09.05.2013, 21:49
Re: Command no work - by Red_Dragon. - 09.05.2013, 21:55
Re : Command no work - by brunoboy - 10.05.2013, 15:53
Re: Command no work - by Private200 - 10.05.2013, 15:57
Re : Command no work - by brunoboy - 10.05.2013, 16:05
AW: Command no work - by Blackazur - 10.05.2013, 16:17
Re : Command no work - by brunoboy - 10.05.2013, 16:19
Re : AW: Command no work - by brunoboy - 10.05.2013, 18:10

Forum Jump:


Users browsing this thread: 1 Guest(s)