31.10.2010, 15:50
pawn Код:
new bool:Weapon[MAX_PLAYERS];
if(!strcmp(cmdtext, "/smuggleweapon", true))
{
//Why were you checking if player was connected? LOL
if(Weapon[playerid] != false) return SendClientMessage(playerid, COLOR_WHITE, "You must wait first!");
{
if(gPlayerLogged[playerid] == 0) //This must be '==' not '='
{
SendClientMessage(playerid, COLOR_GREY, " You need to login first !");
}
if(HouseEntered[playerid] == 0) //This must be '==' not '='
{
SendClientMessage(playerid, COLOR_GREY, " You can only use /smuggleweapon while you are in your cell !");
}
if(HouseEntered[playerid] == 1) //This must be '==' not '='
{
GivePlayerWeapon(playerid,4,1);
ApplyAnimation(playerid,"DEALER","shop_pay",4.1,0,0,0,0,0);
weapontimer = SetTimer("WeaponTimer", 60000, 1);
Weapon[playerid] = true;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You need to /smoke to use this animation ! ");
}
}
return 1;
}
forward WeaponTimer();
public WeaponTimer()
{
Weapon[playerid] = false;
//Your code
}