hi i'm trying to make it so when the person is not incar he can spawn the car and when he is in car he exits the car but it does not spawn the car when the person is not incar
heres the code
Code:
public item_car(){
new arg[32], arg2[32], id, model
read_argv(1,arg,31)
read_argv(2,arg2,31)
id = str_to_num(arg)
model = str_to_num(arg2)
if(incar[id] == 0)
{
new player[33]
server_cmd("amx_createcar %s %s",model,player)
return PLUGIN_HANDLED
}
else
{
remove_entity(id)
client_print(id,print_chat,"[CarMod] You have exited your car.")
}
return PLUGIN_HANDLED
}