Raised This Month: $ Target: $400
 0% 

Help with a custom mod


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
dutchmeat
Senior Member
Join Date: Sep 2006
Old 01-10-2007 , 15:41   Re: Help with a custom mod
Reply With Quote #4

don't use variables that you don't need,
try this:
Code:
new origin[3], query[256]     get_user_origin(id,origin)     if(get_distance(origin,hoteldesk) > 30.0) return PLUGIN_HANDLED     new steamid[32], renter[33], time, kind[33]     switch(key){             case 0:{                 format(query,255,"SELECT name,steamid,minutes,type FROM rentmod WHERE room='Hotel A'")                 result = dbi_query(dbc,query)                 if(dbi_nextrow(result) > 0)                 {                     dbi_field(result,1,renter,32) //stores first field in this renter variable.                     dbi_field(result,2,steamid,31) //like above, but for the steamid                     time = dbi_field(result,3)  //just a normal variable, no need for a max                     dbi_field(result,4,kind,32)  //kind is a string or number ?                     dbi_free_result(result)                 }                 new roommotd[2000]                 new len = format(roommotd,511,"Name: %s^n^n",renter)                 len += format(roommotd[len],511-len,"SteamID: %s^n^n",steamid)                 len += format(roommotd[len],511-len,"Minutes Left: %i^n^n",time)                 len += format(roommotd[len],511-len,"Type of rent: %s^n^n",kind)                 show_motd(id,roommotd,"Hotel A Status")
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat 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 22:26.


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