Barrier Road Deploy [HELP]
#1

Object ID for the barrier is: 978 (just if you wanted to know)


So, the problem is that I'm not able to run a certain command in order to place a deployment at my position. However, this works fine for adding spikes but not the barrier deploy.

Heres a code of my CMD:
PHP код:
COMMAND:bdeploy(playeridparams[])
{
    if(!
IsPlayerFED(playerid)) return SendClientError(playeridCANT_USE_CMD);
    new 
bid;
    if( 
sscanf params"d"bid)) return SCP(playerid"[barrierID]");
    if(
bid || bid MAX_BARRIERS) return SCP(playerid"[barrierID]");
    if(
roadBlockbid ] == 1) return SendClientError(playerid"That roadblock already exists. USE: /bremove");
    
roadBlockbid ] = 1;
    
format(roadBlockPlayerbid ], 32"%s"PlayerName(playerid));
    new 
Float:XFloat:YFloat:ZFloat:A;
    
GetPlayerPos(playeridXYZ);
    
GetPlayerFacingAngle(playeridA);
    
// CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 200.0);
    
roadBlockObjbid ] = CreateDynamicObject(978XYZ0.00.0A,0,0,-1,250);
    
SetPlayerPos(playeridX-1YZ+2);
    
Action(playerid"is deploying a road block.");
    return 
1;

Nothing is wrong in the code, no errors. The command runs fine, but when I do this in game the object won't appear. It's not there.

Any help? Maybe I should've explained a little better but if any of you need more information just tell me and I will give.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)