05.01.2015, 07:40
Dismiss, I think I found the problem.
forward search(playerid);
foward search(playerid);
if(!strcmp(cmdtext, "/search"))
{
if (GetPlayerInterior(playerid) == 1)
{
SetTimerEx("search", 30*1000, false, "i", playerid);
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "[ERROR: You aren't in a lootable interior!]");
}
return 1;
}
return 0;
}
public search(playerid)
{
new r = random(3);
if (r==0)
{
GivePlayerWeapon(playerid, 5, 1);
}
else if (r==1)
{
GivePlayerWeapon(playerid, 24, 50);
}
else if (r==2)
{
GivePlayerWeapon(playerid, 25, 30);
}
return 1;
}