26.12.2013, 06:42
I want to create a timer for this public:
pawn Код:
forward matspick(playerid);
public matspick(playerid)
{
for(new i = 0; i < sizeof(DropInfo); i++)
{
if (PlayerToPoint(1.0,playerid,DropInfo[i][dx],DropInfo[i][dy],DropInfo[i][dz]))
{
if(GetPlayerVirtualWorld(playerid) == DropInfo[i][dWorld])
{
DestroyObject(DropObject[i]);
DropInfo[i][dx] = 0.0;
DropInfo[i][dy] = 0.0;
DropInfo[i][dz] = 0.0;
if(DropInfo[i][dType] == 4) // Crack
{
new string[256];
format(string,sizeof(string),"* %s picks up %d materials.",Name(playerid),DropInfo[i][dAmount]);
ProxDetector(30.0,playerid,string,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED);
PlayerInfo[playerid][pMats] += DropInfo[i][dAmount][0];
DropInfo[i][dAmount][0] = 0;
DropInfo[i][dAmount][1] = 0;
DropInfo[i][dType] = 0;
}
}
}
}
}