SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 16/02/2012, 11:05 AM   #1
Twisted_Insane
Gangsta
 
Twisted_Insane's Avatar
 
Join Date: Feb 2012
Posts: 975
Reputation: 95
Default PutPlayerInVehicle

Hi all! To make this quick, this CMD doesn't work, I probably missed something?

PHP Code:
CMD:acar(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] >= 1)
    {
        
PutPlayerInVehicle(playerid4290);
        
ChangeVehicleColor(42901);

    }
    else return 
SendClientMessage(playerid,COLOR_RED,"You have to be level 1 to use that command!");
    return 
1;

__________________
Join the BEST Gangwar-server ever; Los Santos Gangwars!
http://forum.sa-mp.com/showthread.ph...42#post2235842
^ Read!

Any problems with ZCMD-commands? Simply PM me your topic or check out the tutorial(s) in my signature, more'll come soon!

Twisted_Insane is offline   Reply With Quote
Old 16/02/2012, 11:10 AM   #2
L0zaix
Big Clucker
 
L0zaix's Avatar
 
Join Date: Feb 2012
Location: Manila, Philippines
Posts: 53
Reputation: 2
Default Re: PutPlayerInVehicle

it seems its working to me, maybe you did something wrong
__________________
L0zaix for super star!

-----------------------------
Time is going fast .
if i have ever helped you give me some reputation by clicking
L0zaix is offline   Reply With Quote
Old 16/02/2012, 11:11 AM   #3
[HK]Ryder[AN]
High-roller
 
[HK]Ryder[AN]'s Avatar
 
Join Date: Jan 2012
Location: New Delhi, India
Posts: 1,195
Reputation: 365
Default Re: PutPlayerInVehicle

Have have to store the CreateVehicle in a variable.
Or better still create a new vehicle when a person types this command.
__________________


[HK]Ryder[AN] is offline   Reply With Quote
Old 16/02/2012, 11:13 AM   #4
[Diablo]
Big Clucker
 
Join Date: Aug 2011
Location: Slovenia
Posts: 199
Reputation: 65
Default Re: PutPlayerInVehicle

make sure you use vehicleid and not modelid.
[Diablo] is offline   Reply With Quote
Old 16/02/2012, 11:13 AM   #5
KingHual
Banned
 
Join Date: Jun 2010
Location: Bulgaria
Posts: 2,286
Reputation: 1389
Default Re: PutPlayerInVehicle

Quote:
PutPlayerInVehicle(playerid, 429, 0);
I think you're mistaking the vehicle ID with vehicle model.

Last edited by KingHual; 16/02/2012 at 11:57 AM.
KingHual is offline   Reply With Quote
Old 16/02/2012, 11:18 AM   #6
Twisted_Insane
Gangsta
 
Twisted_Insane's Avatar
 
Join Date: Feb 2012
Posts: 975
Reputation: 95
Default Re: PutPlayerInVehicle

Could be, but I took the ID from here:
http://wiki.sa-mp.com/wiki/Vehicles:All

Where to get the IDs then? I thought on this page are only the IDs!
__________________
Join the BEST Gangwar-server ever; Los Santos Gangwars!
http://forum.sa-mp.com/showthread.ph...42#post2235842
^ Read!

Any problems with ZCMD-commands? Simply PM me your topic or check out the tutorial(s) in my signature, more'll come soon!

Twisted_Insane is offline   Reply With Quote
Old 16/02/2012, 11:19 AM   #7
[Diablo]
Big Clucker
 
Join Date: Aug 2011
Location: Slovenia
Posts: 199
Reputation: 65
Default Re: PutPlayerInVehicle

those are model id's, vehiceid is returned by createvehicle() or addstaticvehicle()
[Diablo] is offline   Reply With Quote
Old 16/02/2012, 11:19 AM   #8
[HK]Ryder[AN]
High-roller
 
[HK]Ryder[AN]'s Avatar
 
Join Date: Jan 2012
Location: New Delhi, India
Posts: 1,195
Reputation: 365
Default Re: PutPlayerInVehicle

If you have many cars of the model 429 then I think you should store a particular one in a variable or create a new vehicle when a person types this cmd.
__________________


[HK]Ryder[AN] is offline   Reply With Quote
Old 16/02/2012, 11:21 AM   #9
niels44
High-roller
 
niels44's Avatar
 
Join Date: Jul 2011
Location: Wooden Box
Posts: 1,101
Reputation: 39
Default Re: PutPlayerInVehicle

try this one:
pawn Code:
CMD:acar(playerid, params[])
{
    new Float:x, Float:y, Float:z,Float:angle;
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
        PutPlayerInVehicle(playerid,  CreateVehicle(429, x,y,z,angle, 0, 0, 60), 0);
        ChangeVehicleColor(429, 0, 1);

    }
    else return SendClientMessage(playerid,COLOR_RED,"You have to be level 1 to use that command!");
    return 1;
}

UNTESTED but i think it should work XD
niels44 is offline   Reply With Quote
Old 16/02/2012, 11:24 AM   #10
[Diablo]
Big Clucker
 
Join Date: Aug 2011
Location: Slovenia
Posts: 199
Reputation: 65
Default Re: PutPlayerInVehicle

but ChangeVehicleColor() also needs a vehicleid as parameter and not modelid.
[Diablo] is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
PutPlayerInVehicle Bocky1337 Bug Reports 6 24/12/2011 08:44 AM
PutPlayerInVehicle ColdXX Help Archive 7 24/09/2010 10:32 PM
PutPlayerInVehicle FireCat Help Archive 3 18/09/2010 05:12 PM
PutPlayerInVehicle FireCat Help Archive 4 18/09/2010 03:21 PM
putplayerinvehicle thomas.. Help Archive 1 06/09/2010 04:59 PM


All times are GMT. The time now is 04:56 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.