Jump to content

[HELP] CreatePickup and Team Problem


Recommended Posts

Hello,

made a LSPD team system, I have all finished but I dont know why this scipt doesnt work!?

After picking up the pickup you should get a cop uniform when you are in the LSPD team. But it isnt working...

BTW how I can add a payday system in this scipt? As example when your 30 min in the cop uniform you will get 300$.

coppickup = createPickup( 238.19999694824, 80.300003051758, 1005, 3, 1275, 1, 1 ) 
setElementInterior ( coppickup, 6 ) 
  
  
  
function startCopJob (player) 
local team = getPlayerTeam(player) 
if (getTeamName(team)== "LSPD") then 
setElementModel(player, 280) 
outputChatBox("Вы начали рабочий день!", Player, 0,191,255) 
else 
outputChatBox("Вы не сотрудник LSPD!", Player, 0,191,255) 
end 
end 
  
addEventHandler ( "onPickupHit", coppickup, startCopJob ) 

Link to comment
Player is in LSPD but still dont work ..

Use /debugscript 3 and try this

function startCopJob (player) 
    if player and isElement(player) then  
        local team = getPlayerTeam(player) 
            if team then  
            if (getTeamName(team)== "LSPD") then 
                setElementModel(player, 280) 
                outputChatBox("Вы начали рабочий день!", player, 0,191,255) 
            else 
                outputChatBox("Вы не сотрудник LSPD!", player, 0,191,255) 
            end  
        end 
    end  
end 
addEventHandler ( "onPickupHit", coppickup, startCopJob ) 

Edited by Guest
Link to comment
Player is in LSPD but still dont work ..

Use /debugscript 3 and try this

function startCopJob (player) 
    if player and isElement(player) then  
        local team = getPlayerTeam(player) 
            if team then  
            if (getTeamName(team)== "LSPD") then 
                setElementModel(player, 280) 
                outputChatBox("Вы начали рабочий день!", player, 0,191,255) 
            else 
                outputChatBox("Вы не сотрудник LSPD!", player, 0,191,255) 
            end  
        end 
    end  
end 
addEventHandler ( "onPickupHit", coppickup, startCopJob ) 

In debugscript is says nothing when I hit the marker or not. Just says nothing about this marker...

Idk what to do

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...