SA-MP Forums Archive
Spawn pickup + text label - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Spawn pickup + text label (/showthread.php?tid=581958)



Spawn pickup + text label - DavidSparks - 16.07.2015

So I am trying to make a script where i spawn a pickup and a text label but its not working..

pawn Код:
CMD:spawnreqhouse(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
       new Float:x,Float:y,Float:z;
       CreatePickup(1239, 23, x,y,z);
       CreateDynamic3DTextLabel("To request a house at \nthis location, use /requesthouse",COLOR_RED, Float:x,Float:y,Float:z+0.5,4.0);
       return 1;
    }
    return 1;
}
Whats wrong?


Re: Spawn pickup + text label - MohammedZ - 16.07.2015

Try this

Quote:

CMDpawnreqhouse(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new Float,Float:y,Float:z;
CreatePickup(1239, 23, x,y,z);
CreateDynamic3DTextLabel(COLOR_RED, "To request a house at \nthis location, use /requesthouse",Float,Float:y,Float:z+0.5,4.0);
return 1;
}
return 1;
}




Re: Spawn pickup + text label - MBilal - 16.07.2015

Quote:
Originally Posted by DavidSparks
Посмотреть сообщение
So I am trying to make a script where i spawn a pickup and a text label but its not working..

pawn Код:
CMD:spawnreqhouse(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
       new Float:x,Float:y,Float:z;
       CreatePickup(1239, 23, x,y,z);
       CreateDynamic3DTextLabel("To request a house at \nthis location, use /requesthouse",COLOR_RED, Float:x,Float:y,Float:z+0.5,4.0);
       return 1;
    }
    return 1;
}
Whats wrong?
try this

pawn Код:
CMD:spawnreqhouse(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
       new Float:x,Float:y,Float:z;
      GetPlayerPos(playerid,x,y,z);
       CreatePickup(1239, 23, x,y,z);
       CreateDynamic3DTextLabel("To request a house at \nthis location, use /requesthouse",COLOR_RED,x,y,z+0.5,4.0);
       return 1;
    }
    return 1;
}



Re: Spawn pickup + text label - MohammedZ - 16.07.2015

Lol,, I forgot about it totally! goodjob MIblal
Do like he said