COmmands
#5

Worked but only remove id 0.

Quote:
Originally Posted by ALoX12
Посмотреть сообщение
also this
PHP код:
CMD:addcar(playerid,params[])
{
        new 
tmp[256];
        new 
cmd[256+1];
        new 
idx;
        
cmd strtok(cmdtextidx);
        
tmp strtok(cmdtext,idx);
        new 
hid strval(tmp);
        if(
IsPlayerInAnyVehicle(playerid))
        {
            new 
Float:X,Float:Y,Float:Z,Float:Angle;
            
GetVehiclePos(GetPlayerVehicleID(playerid), XYZ);
            
GetVehicleZAngle(GetPlayerVehicleID(playerid), Angle);
            new 
model GetVehicleModel(GetPlayerVehicleID(playerid));
            
dini_IntSet(HouseFile(hid),"vModel",model);
            
dini_FloatSet(HouseFile(hid),"vX",X);
            
dini_FloatSet(HouseFile(hid),"vY",Y);
            
dini_FloatSet(HouseFile(hid),"vZ",Z);
            
dini_FloatSet(HouseFile(hid),"vAng",Angle);
        }
        else return 
SendClientMessage(playerid,-1,"You need to be in a vehicle to add a house car");
        return 
1;

PHP код:
CMD:removehouse(playeridparams[])
{
        new 
tmp[256];
        new 
cmd[256+1];
        new 
idx;
        
cmd strtok(cmdtextidx);
        
tmp strtok(cmdtext,idx);
        new 
hid strval(tmp);
        if(
dini_Exists(HouseFile(hid)))
        {
            foreach(
Playeri)
            {
                if(
IsPlayerInHouse[i][hid] == 1)
                {
                    
ExitPlayerFromHouse(i,hid);
                }
            }
            
Delete3DTextLabel(HouseInfo[hid][Text]);
            
DestroyDynamicCP(hCpOut[hid]);
            
IsValidDynamicCP(hCpIn[hid]);
            
dini_Remove(HouseFile(hid));
        }
        return 
1;

anyone else? to convert this into zcmd?
Reply


Messages In This Thread
COmmands - by ALoX12 - 14.07.2015, 18:13
Re: COmmands - by kloning1 - 14.07.2015, 18:16
Re: COmmands - by ALoX12 - 14.07.2015, 18:20
Re: COmmands - by kloning1 - 14.07.2015, 18:27
Re: COmmands - by ALoX12 - 14.07.2015, 18:37
Re: COmmands - by ALoX12 - 14.07.2015, 21:18

Forum Jump:


Users browsing this thread: 2 Guest(s)