cmd to edit dynamic vehicle positions
#5

Nah doin it atm.

EDIT: Can you plss rework this for me ?
EDIT2: Nvm i will do it on my own i got it all thanks for help anyways

PHP Code:
    idx oEditID[playerid];
    if(
response == EDIT_RESPONSE_UPDATE)
    {
        
SetDynamicObjectPos(objectidxyz);
        
SetDynamicObjectRot(objectidrxryrz);
    }
    else if(
response == EDIT_RESPONSE_CANCEL)
    {
        
SetDynamicObjectPos(objectidoPos[playerid][0], oPos[playerid][1], oPos[playerid][2]);
        
SetDynamicObjectRot(objectidoRot[playerid][0], oRot[playerid][1], oRot[playerid][2]);
        
oPos[playerid][0] = 0oPos[playerid][1] = 0oPos[playerid][2] = 0;
        
oRot[playerid][0] = 0oRot[playerid][1] = 0oRot[playerid][2] = 0;
        
format(stringsizeof(string), " You have canceled editing object ID %d."idx);
        
SendClientMessage(playeridCOLOR_WHITEstring);
    }
    else if(
response == EDIT_RESPONSE_FINAL)
    {
        
SetDynamicObjectPos(objectidxyz);
        
SetDynamicObjectRot(objectidrxryrz);
        if(
oEdit[playerid] == 1)
        {
            
oldoID ObjInfo[idx][oModel];
            
ObjInfo[idx][oX] = x;
            
ObjInfo[idx][oY] = y;
            
ObjInfo[idx][oZ] = z;
            
ObjInfo[idx][oRX] = rx;
            
ObjInfo[idx][oRY] = ry;
            
ObjInfo[idx][oRZ] = rz;
              
oldodX ObjInfo[idx][oX];
              
oldodY ObjInfo[idx][oY];
              
oldodZ ObjInfo[idx][oZ];
              
oldodRX ObjInfo[idx][oRX];
              
oldodRY ObjInfo[idx][oRY];
              
oldodRZ ObjInfo[idx][oRZ];
            if(
IsValidDynamic3DTextLabel(ObjInfo[idx][oText])) DestroyDynamic3DTextLabel(ObjInfo[idx][oText]);
            
format(stringsizeof(string), "Object ID: %d (Model ID: %d)"idxObjInfo[idx][oModel]);
            
ObjInfo[idx][oText] = CreateDynamic3DTextLabel(stringCOLOR_WHITEObjInfo[idx][oX], ObjInfo[idx][oY], ObjInfo[idx][oZ], 10);
            
oEdit[playerid] = 0;
            
oEditID[playerid] = 0;
            
format(stringsizeof(string), " You have finished editing object ID %d's position."idx);
            
SendClientMessage(playeridCOLOR_WHITEstring);
        }
    } 
Reply


Messages In This Thread
cmd to edit dynamic vehicle positions - by weedxd - 03.10.2014, 07:58
Respuesta: cmd to edit dynamic vehicle positions - by ghost556 - 03.10.2014, 08:01
Re: Respuesta: cmd to edit dynamic vehicle positions - by weedxd - 03.10.2014, 08:04
Respuesta: cmd to edit dynamic vehicle positions - by ghost556 - 03.10.2014, 08:19
Re: cmd to edit dynamic vehicle positions - by weedxd - 03.10.2014, 08:24

Forum Jump:


Users browsing this thread: 1 Guest(s)