Settimer
#1

Hi sorry i ask many Question How can i set a timer for My farmer job for cant use check point teleporter and when use it and go check point for farmer under 10 secend kick from server
Reply
#2

In your checkpoint use this FarmerCheck [ playerid ] = gettime ( ) + 10;
In checkpoint use verification:

Quote:

if ( FarmerCheck [ playerid ] > gettime ( ) ){
Kick ( playerid ) ;
}

Reply
#3

This is my farmer cods


PHP код:
        if(IsAHarvest2(newcar))
        {
        if(
PlayerInfo[playerid][pJob] == 18)
            {
            
ManTooCom[playerid] = 1;
            if(
OnCheckpoint[playerid] == 1) { SCM(playerid,COLOR_Good,"You already have an enable checkpoint."); }
            else
            {
            
SCM(playerid,COLOR_YELLOW,"Your farming is started,work to earn money.");
            
randomsms[playerid] = RandomShomare(1,5);
            if(
randomsms[playerid] == 1)
            {
            
OnCheckpoint[playerid] = 1;
            
CP[playerid] = 35469;
            
SetPlayerCheckpoint(playerid,-1110.039184,-1009.396606,128.780563,5);
            }
            if(
randomsms[playerid] == 2)
            {
            
OnCheckpoint[playerid] = 1;
            
CP[playerid] = 35471;
            
SetPlayerCheckpoint(playerid,-1066.485229,-972.397888,129.218750,5);
            }
            if(
randomsms[playerid] == 3)
            {
            
OnCheckpoint[playerid] = 1;
            
CP[playerid] = 35473;
            
SetPlayerCheckpoint(playerid,-1047.418945,-1028.907348,129.211929,5);
            }
            if(
randomsms[playerid] == 4)
            {
            
OnCheckpoint[playerid] = 1;
            
CP[playerid] = 35475;
            
SetPlayerCheckpoint(playerid,-1117.415405,-1055.386230,129.218750,5);
            }
            if(
randomsms[playerid] == 5)
            {
            
OnCheckpoint[playerid] = 1;
            
CP[playerid] = 35477;
            
SetPlayerCheckpoint(playerid,-1013.720947,-921.570800,129.212646,5);
            }
            }
            }
            else { 
SendClientMessage(playeridCOLOR_LIGHTBLUE"You are not Farmer.");
                
RemovePlayerFromVehicle(playerid);
                new 
Float:xFloat:yFloat:z;
                
GetPlayerPos(playeridxyz);
                
SetPlayerPos(playeridx+0.5y+0.5z);
            }
        } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)