Hi,
I want to disable planting if a specific task exists but only when the bomb is picked up but cs_set_user_plant doesnt seem to be working in the following code:
PHP Code:
register_event("TextMsg","event_bomb_pickup","bc","2&#Got_bomb")
public event_bomb_pickup(id)
{
if(task_exists(TASK_ID))
{
client_print(id, print_chat, "Planting Disabled")
cs_set_user_plant(id, 0, 0)
}
}
I can see the Planting Disabled message when i pick up the bomb but I can still plant the bomb
cs_set_user_plant works with the following but these events r also fired when the round starts:
PHP Code:
register_event("StatusIcon", "event_bomb_pickup", "be", "1=1", "1=2", "2=c4")
PHP Code:
register_event("WeapPickup", "event_bomb_pickup", "be", "1=6")