Near weed?
#10

It is entirely my fault. Sorry, wait a minute while I edit it.

PHP код:
new Float:Weedx[MAX_PLAYERS], Float:Weedy[MAX_PLAYERS], Float:Weedz[MAX_PLAYERS], FloatWeeda[MAX_PLAYERS]; 
command(plantseedplayeridparams[]) 

    if(
Player[playerid][Seeds] == 0
        return 
SendClientMessage(playeridRED"> You don't have any seeds!"); 
    { 
        
SendClientMessage(playeridWHITE"You've planted one seed!"); 
        
SetTimerEx("WeedTimer"200000"i"playerid); 
         
Player[playerid][Seeds] -= 1
        
GetPlayerFacingAngle(playeridWeeda[playerid]); 
        
GetPlayerPos(playeridWeedx[playerid], Weedy[playerid], Weedz[playerid]); 
        
Player[playerid][Seeds] = CreateObject(3409Weedx[playerid], Weedy[playerid], Weedz[playerid] - 1.30.00.0Weeda[playerid] + 90); 
        
SavePlayerData(playerid); 
    } 
    return 
1

command(takeweedplayeridparams[]) 

    
GetObjectPos(Player[playerid][Seeds],Weedx[playerid],Weedy[playerid],Weedz[playerid]); 
    if(
Player[playerid][TakeWeed] == 0
        return 
SendClientMessage(playeridRED"> You don't have any weed to take!"); 
    { 
        if(
IsPlayerInRangeOfPoint(playerid2Weedx[playerid], Weedy[playerid], Weedz[playerid])) 
        { 
             if(
GetPlayerWeapon(playerid) == 4
            { 
                
SetTimerEx("Takingweed"200000"i"playerid); 
                
TogglePlayerControllable(playeridfalse); 
                
ApplyAnimation(playerid"BOMBER","BOM_Plant_Loop",4.0,1,0,1,1,0); 
            } 
            else 
            { 
                
SendClientMessage(playeridRED"> You don't have an knife on you!"); 
            } 
        } 
        else 
        { 
            
SendClientMessage(playeridRED"> You are not near your weed!"); 
        } 
    } 
    return 
1

Try this, it should work. Apologies for the mistake on my behalf, i have been scripting for 5 hours now. I lost a few of my brain cells :/
Reply


Messages In This Thread
Near weed? - by lulo356 - 04.02.2016, 13:55
Re: Near weed? - by Matess - 04.02.2016, 14:08
Re: Near weed? - by Rufio - 04.02.2016, 14:16
Re: Near weed? - by TopShooter - 04.02.2016, 14:19
Re: Near weed? - by lulo356 - 04.02.2016, 14:22
Re: Near weed? - by Rufio - 04.02.2016, 14:23
Re: Near weed? - by lulo356 - 04.02.2016, 14:29
Re: Near weed? - by Rufio - 04.02.2016, 14:33
Re: Near weed? - by lulo356 - 04.02.2016, 14:41
Re: Near weed? - by Rufio - 04.02.2016, 14:46

Forum Jump:


Users browsing this thread: 2 Guest(s)