[HELP]CameraCheck
#1

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);
    }
}

Reply
#2

Ummh. Well it will send him the message 100% because you put the timer under OnPlayerSpawn....
Reply
#3

Yes, but the message should only be sended once if a player "waste his ammo" for his camera.
Reply
#4

But when you die you lose your weapons, so when he spawns he won't have a camera...
Reply
#5

Ok, and what can I do to solve this problem? Has the timer to be on another place?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)