Raised This Month: $ Target: $400
 0% 

Jailmod problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Defillbert
AMX Mod X Donor
Join Date: Aug 2006
Old 11-29-2006 , 23:45   Jailmod problem
Reply With Quote #1

Im a really new scripter soo any help at all with this would be nice
This is for TS
Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <engine_stocks>
#include <fun>
#include <dbi>
#include <tsfun>
#include <tsxaddon>
public plugin_init()
{
 register_plugin("Jailmod", AMXX_VERSION_STR, "Defillbert")
 register_concmd("amx_jailtime", "jailmod", -1, "Face player and execute [Jailtime]")
}
public jailmod(id, level, cid)
{
  new name[33], name2[33], authid[32], authid2[32], query[256]
  get_user_name(id, name, sizeof(name))
  get_user_name(entid, name2, sizeof(name2))
  get_user_authid(id, authid, 31)
  get_user_authid(entid, authid2, 31)
  format( query, 255, "SELECT JobID FROM money WHERE steamid='%s'", authid)
  result = dbi_query(dbc,"%s",query) 
  if(result >= RESULT_OK)
  {
   dbi_nextrow(result)
   
   new job[32], JobID
   dbi_field( result, 1, job, 31) 
   dbi_free_result(result)
   
   JobID = str_to_num(job)
   if((JobID >= mcpdjobs[0] && JobID <= mcpdjobs[1]))
   {
 new entid, entbody
 get_user_aiming(id,entid,entbody,100)
 new jailtime[32], authid[32], name2[32], authid2[32], name[32]
 
 read_argv(1, jailtime, 31)
 new time = str_to_num(jailtime)
 
 get_user_authid(id, authid, 31)
 get_user_name(id, name, 31)
 get_user_authid(entid, authid2, 31)
 get_user_name(entid, name2, 31)
 set_task(float(time),"jailcmd",entid)
 set_task(0.5,"model",entid)
 console_print(id, "[AMXX]", id, "Player has been jailed for '%i' minutes", time)
 
 return PLUGIN_HANDLED
 else
 {
 return plugin_handled
 }
 
}
public jailcmd(id)
{
 set_user_origin(id, {-2191, 2061, -347})
}
public model(id)
{
 client_cmd(id,"model convict")
}

Last edited by Defillbert; 11-30-2006 at 00:42.
Defillbert is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:51.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode