20.08.2014, 08:18
(
Последний раз редактировалось Fjclip99; 20.08.2014 в 10:46.
)
I am having some problems with a command so can someone make a script for me ?
So when player types /usedrugs he gets 50 armor and he gets animation "CRACK" for about 15 seconds and in that time player can't move.
After 15 seconds player can move again...
EDIT: this is my old system but when player first type the command he don't get the animation but when he second type the command, he gets the animation.
So when player types /usedrugs he gets 50 armor and he gets animation "CRACK" for about 15 seconds and in that time player can't move.
After 15 seconds player can move again...
EDIT: this is my old system but when player first type the command he don't get the animation but when he second type the command, he gets the animation.
Код:
YCMD:usedrugs(playerid,params[],help)
{
new option[10];
if(sscanf(params,"s[10]",option)) return SendClientMessage(playerid,COLOR_WHITE,""blue""red"UPORABA:"white""white" /usedrugs [Option] | Options: heroin, ((weed))");
if(strcmp(option,"heroin") == 0)
{
if(pInfo[playerid][Drugs] >= 51)
{
new Floar:armour;
GetPlayerArmour(playerid, Float:armour);
SetPlayerArmour(playerid, Float:armour + 50);
pInfo[playerid][Drugs] = pInfo[playerid][Drugs] - 50;
GetPlayerArmour(playerid, Float:armour);
if(Float:armour >= 101) SetPlayerArmour(playerid, 100);
ClearAnimations(playerid);
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.1, 0, 0, 0,0, 15000, 0);
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerWeather(playerid, -66);
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
SetTimerEx("Drugsoff", 15000, 0, "i", playerid);
for(new i; i < MAX_PLAYERS; i++)
if(IsPlayerInRangeOfPoint(i, 20.0, x,y,z))
{
new string[128];
format(string,sizeof(string),"* %s vzema heroin.",pName);
SendClientMessage(i,COLOR_ACTION,string);
}
}
else return SendClientMessage(playerid,COLOR_RED,"Nimate dovolj droge pri sebi.");
}
if(strcmp(option,"weed") == 0)
{
if(pInfo[playerid][Drugs] >= 11)
{
}
}
return 1;
}
forward Drugsoff(playerid);
public Drugsoff(playerid)
{
SetCameraBehindPlayer(playerid);
SetPlayerWeather(playerid, 2);
ClearAnimations(playerid);
return 1;
}


