04.02.2016, 16:17
I have created an drug system, If you buy seeds you get 10 seeds - Going good,
When you place the seeds your seeds counter raising - Not good...
http://www.upload.ee/image/5539435/sa-mp-011.png
(I've tryed alot of times to fix this in the picture)
When you place the seeds your seeds counter raising - Not good...
http://www.upload.ee/image/5539435/sa-mp-011.png
(I've tryed alot of times to fix this in the picture)
PHP код:
command(plantseed, playerid, params[])
{
if(Player[playerid][Seeds] == 0)
return SendClientMessage(playerid, RED, "> You don't have any seeds!");
{
SendClientMessage(playerid, WHITE, "You've planted one seed!");
SetTimerEx("WeedTimer", 20000, 0, "i", playerid);
Player[playerid][Seeds]--;
GetPlayerFacingAngle(playerid, Weeda[playerid]);
GetPlayerPos(playerid, Weedx[playerid], Weedy[playerid], Weedz[playerid]);
Player[playerid][Seeds] = CreateObject(3409, Weedx[playerid], Weedy[playerid], Weedz[playerid] - 1.3, 0.0, 0.0, Weeda[playerid] + 90);
SavePlayerData(playerid);
}
return 1;
}