19.01.2013, 20:52
I want to make it to where when the player types /plant, it will make a 3D text label with the "COL_PURPLE" above their head saying, "* %s plants cannabis seeds." I tried a few ways of doing this, but I'm not experienced enough. Can someone help me out with this issue?
PHP код:
CMD:plant(playerid, params[])
{
if(PlayerInfo[playerid][pSeeds] > 2)
{
new Name[MAX_PLAYER_NAME],Float:x,Float:y,Float:z,string[128];
GetPlayerName(playerid,Name, sizeof(Name));
GetPlayerPos(playerid,x,y,z);
CreateObject(19473,x,y,z-2,0,0,0);
PlayerInfo[playerid][pSeeds]-=3;
}
else
SendClientMessage(playerid,COL_WHITE,"You don't have enough seeds!");
return 1;
}