20.10.2016, 07:11
Hello guys, I've made this cmd yesterday:
now it works fine, but if a player has 100 hp is still uses cocaine, and sends both messages e.g.

how do I fix this?
and another question I have is how to spawn vehicels with a timer? I think because I am using streamer plugin the map loads after I get to see the vehicles, and they all fall down into the water:

what I showed above is the vehicles as they spawn once I am near the map..anyway to fix this? thanks in advance!
EDIT: how do I remove that clock from the top? it really grinds my gears
Код:
CMD:usecoca(playerid, params[])
{
if(PlayerInfo[playerid][Cocaine] >=2)
{
SendClientMessage(playerid, -1, "you just used 2 grams of cocaine restored 20 hp");
PlayerInfo[playerid][Cocaine] -= 2; //too stoned fix 2moro
new Float:health;
GetPlayerHealth(playerid,health);
if (health < 100)
{
SetPlayerHealth(playerid, health +15);
}
else if(health == 100)
{
SendClientMessage(playerid, -1, "why use coca");
}
}
else SendClientMessage(playerid, -1, "you dont have enough coca");
return 1;
}

how do I fix this?
and another question I have is how to spawn vehicels with a timer? I think because I am using streamer plugin the map loads after I get to see the vehicles, and they all fall down into the water:

what I showed above is the vehicles as they spawn once I am near the map..anyway to fix this? thanks in advance!
EDIT: how do I remove that clock from the top? it really grinds my gears


