14.03.2010, 05:12
I just wanted to add a 1 minute wait between the time someone can use /equip in a HQ, here is my cmd
If someone could kindly tell me how i can do this, that would be greatly appreciated
pawn Код:
if(strcmp(cmd, "/equip", true) == 0)
{
new playhq = PlayerInfo[playerid][pGang]-1;
if (PlayerToPoint(50, playerid,HQInfo[playhq][hqExitx], HQInfo[playhq][hqExity], HQInfo[playhq][hqExitz]))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s gets equipped", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
if ((HQInfo[playhq][hqGun1])||(HQInfo[playhq][hqGun2])||(HQInfo[playhq][hqGun3])||(HQInfo[playhq][hqGun4]) > 1)
{
GivePlayerWeapon(playerid,HQInfo[playhq][hqGun1],HQInfo[playhq][hqAmo1]);
GivePlayerWeapon(playerid,HQInfo[playhq][hqGun2],HQInfo[playhq][hqAmo2]);
GivePlayerWeapon(playerid,HQInfo[playhq][hqGun3],HQInfo[playhq][hqAmo3]);
GivePlayerWeapon(playerid,HQInfo[playhq][hqGun4],HQInfo[playhq][hqAmo4]);
GivePlayerWeapon(playerid,HQInfo[playhq][hqGun5],HQInfo[playhq][hqAmo5]);
}
if (HQInfo[playhq][hqHel] == 1)
{
SetPlayerHealth(playerid,100.0);
SendClientMessage(playerid, TEAM_GREEN_COLOR,"You have been healed to 100 health");
}
if (HQInfo[playhq][hqArm] == 1)
{
SetPlayerArmour(playerid,100.0);
SendClientMessage(playerid, TEAM_GREEN_COLOR,"You put on body armour");
}
format(string, sizeof(string), "You picked up some weapon's");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
printf("%s", string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "You are not in a gang HQ");
return 1;
}
}