Raised This Month: $ Target: $400
 0% 

Car-pool script, help please.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Smokey485
Senior Member
Join Date: Dec 2004
Location: Newt 'Ellin
Old 04-23-2006 , 00:04   Car-pool script, help please.
Reply With Quote #1

Code:
// global definitions that would be at the top new carpool[33] new carpooled[33] new incar[33] new torigin[33] public helipool(id) {     new blah1, blah2     if(get_user_aiming(id,carpool[id],blah2,200)) {         if(!is_user_connected(carpool[id]))         {             client_print(id,print_chat,"[CarMod] Invalid target.")             return PLUGIN_HANDLED;         }         if(incar[carpool[id]] == 0)         {             client_print(id,print_chat,"[CarMod] Target not in car.")             return PLUGIN_HANDLED;         }         if(carpooled[id] > 0)         {             client_print(id,print_chat,"[CarMod] Already carpooled.")             return PLUGIN_HANDLED;         }         client_print(id,print_chat,"[CarMod] You are now car-pooled in! Say /uncarpool to get out!")         get_user_origin(carpool[id], torigin[id])         torigin[id][2] += 80         carpooled[id] = 1         set_user_origin(id, torigin[id])         set_task(0.1, "originchange", id+45, "", 0, "b")         return PLUGIN_HANDLED     } else {         client_print(id,print_chat,"[CarMod] Too far away to car-pool.")         return PLUGIN_HANDLED     }     return PLUGIN_HANDLED; } public originchange(id) {     id -= 45     if(carpool[id] = 0)     {         remove_task(id+45)         return PLUGIN_HANDLED;     }     get_user_origin(carpool[id], torigin[id])     torigin[id][2] += 80         set_user_origin(id, torigin[id])     return PLUGIN_HANDLED; } public removepool(id) {     carpool[id] = 0     carpooled[id] = 0     client_print(id,print_chat,"[CarMod] You are no longer car-pooling!")     remove_task(id+45)     return PLUGIN_HANDLED; }

Theres an error in originchange(id) on the line where it says get_user_origin(carpool[id], torigin[id]), it says theres a native error but WTF, Ive tried so much stuff to fix this, oh well.

Please someone help me, thank you.
__________________
+karma if I am helpful to you.
I am one in a few million.
Smokey485 is offline
Send a message via AIM to Smokey485 Send a message via MSN to Smokey485
Des12
Senior Member
Join Date: Jan 2005
Old 04-23-2006 , 01:58  
Reply With Quote #2

Code:
new torigin[33][3]
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 is offline
Smokey485
Senior Member
Join Date: Dec 2004
Location: Newt 'Ellin
Old 04-23-2006 , 19:47  
Reply With Quote #3

oh sorry, uh the error only appears in debug, and i accidently forgot to put torigin[33][3] in the source i supplied here, the one i have in my actual code matches what you just gave me..


debug on the line with get_user_origin, or whAtever gives a native error, but not when I try to compile it only in game when we carpool
__________________
+karma if I am helpful to you.
I am one in a few million.
Smokey485 is offline
Send a message via AIM to Smokey485 Send a message via MSN to Smokey485
Des12
Senior Member
Join Date: Jan 2005
Old 04-23-2006 , 23:13  
Reply With Quote #4

Code:
 if(carpool[id] == 0)     {         remove_task(id+45)         return PLUGIN_HANDLED;     }

You had one =
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 is offline
Reply



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 05:07.


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