20.05.2009, 08:29
Hi all, I've mad a code for a CameraCheck, but it doesn't work as I want. Each Time I spawn, the's a message sended. Anybody can help me?
pawn Код:
//on top of the script
new CameraCheckTimer;
forward CameraCheck(playerid);
//under OnPlayerSpawn
CameraCheckTimer = SetTimerEx("CameraCheck",1000,1,"i",playerid);
//anywhere in the script
public CameraCheck(playerid)
{
new weapons[13][2];
for (new i = 0; i < 13; i++)
{
GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
}
if(weapons[9][0])
{
SendClientMessage(playerid,RED,"You ain't got a camera.");
KillTimer(CameraCheckTimer);
}
}