20.05.2009, 17:37
Can somebody write a code which is able to check the player if he has got a CAMERA? If he has one, nothing, if he hasn't got one, SendClientMessage. Thanks.
Originally Posted by Marc_307
Can somebody write a code which is able to check the player if he has got a CAMERA? If he has one, nothing, if he hasn't got one, SendClientMessage. Thanks.
|
Originally Posted by wiki.sa-mp.com
(***) The imagery effects from these weapons (43, 44, 45 ids) will show for all players.
|
//on top of the script
new CameraCheckTimer;
forward CameraCheck(playerid);
//under OnPlayerSpawn
CameraCheckTimer = SetTimerEx("CameraCheck",1000,1,"i",playerid);
//in the script
public CameraCheck(playerid)
{
new ammo,weapon;
GetPlayerWeaponData(playerid,9,weapon,ammo);
if(weapon == 43)
{
if(ammo < 1)
{
SendClientMessage(playerid,RED,"No camera!!!");
KillTimer(CameraCheckTimer);
}
}
}
Originally Posted by Marc_307
yes, but the player should always be checked, nut only when he spawns.
|