on Check point Entered

Started by Kewun, Aug 07, 2016, 07:38 AM

Previous topic - Next topic

Kewun

function onCheckpointEntered(player,sphere)
{
if (sphere.ID==0)
{
if (player.WantedLevel > 0)
{
MessagePlayer("[#ffffff]You are wanted!!!",player)
return false;
}
if(player.Skin != 1)
{
player.Skin = 1;
MessagePlayer("[#ffffff]You started police mission!",player)
}
if (player.Skin == 1)
{
player.Skin = 7;
MessagePlayer("[#ffffff]You quited police mission!",player)
}
}
}
when i walk in the checkpoint, it floods the messages, how to fix this ? :(


screenshot: http://imgur.com/a/mUI1Y

Xmair


Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

Kewun

same thing happens, but less flashes


jayant

Try this -
//upper codes
//if player is wanted,return false,check other things
if(player.Skin != 1)
 {
 player.Skin = 1;
 MessagePlayer("[#ffffff]You started police mission!",player)
 }
else if (player.Skin == 1)
 {
 player.Skin = 7;
 MessagePlayer("[#ffffff]You quited police mission!",player)
 }

Kewun