Spawn object...
#1

This code spawn the opject "over the head" of the player,
pawn Код:
case 5:
            {
                    new Float:X, Float:Y, Float:Z, Float:A;
                    GetPlayerPos(playerid, X, Y, Z);
                    GetPlayerFacingAngle(playerid, A);
                    if(atblock[playerid] < MAX_ROADBLOCKS)
                    {
                        block[atrb][playerid] = CreateObject(18728, X, Y, Z-0.2, A, 150);
                        GameTextForPlayer(playerid,"~w~Flare ~b~Created!",3000,1);
                        #if SEND == true
                        GetPlayerName(playerid,pName,32);
                        format(string,sizeof string," %s added a roadblock(%i).",pName,number);
                        SendClientMessageToAll(COLOR_GREEN, string);
                        #else
                        SetTimerEx("ExpireRoadblock", EXPIRE_MINUTES*60000, false, "i", block[atrb][playerid]);
                        atblock[playerid] += 1;
                        #endif
                    } else {
                        format(string,sizeof string,"You cannot place more then %i Roadblocks!",MAX_ROADBLOCKS);
                        SendClientMessage(playerid, COLOR_RED, string);
                    }
                    return 1;
            }
How i can spawn the object under the foot? (i mean spawn at ground level the object)
Reply


Messages In This Thread
Spawn object... - by Gooday - 02.01.2012, 13:03
Re: Spawn object... - by Babul - 02.01.2012, 13:17

Forum Jump:


Users browsing this thread: 1 Guest(s)