SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 25/01/2013, 12:17 PM   #1
edzis84
Big Clucker
 
edzis84's Avatar
 
Join Date: Jan 2013
Location: Latvia
Posts: 152
Reputation: 26
Default Spawn menu

I did not want to make new topic so i will ask here another question.

When i log in there pops out that skin selector and option to spawn, how to remove it?

Last edited by edzis84; 25/01/2013 at 03:08 PM.
edzis84 is offline   Reply With Quote
Old 25/01/2013, 01:15 PM   #2
arakuta
High-roller
 
arakuta's Avatar
 
Join Date: Jan 2011
Location: Itajaí - Brazil
Posts: 2,182
Reputation: 184
Default Re: Remove from vehicle/other

Use callback OnPlayerStateChange instead of OnPlayerEnterVehicle.
Because OnPlayerStateChange is called when the player really enter the vehicle.
OnPlayerEnterVehicle is called when a pkayer try to enter.

About the second question, do a stock like this to get the job name using the job id:

pawn Code:
stock GetJobName(jobid)
{
    new job[20];
    switch(jobid)
    {
        case 1: job = "Farmer";
        case 2: job = "Trucker";
        //case 3: job = "Job";
    }
    return job;
}

CMD:jobname(playerid)
{
    new a[20+20];
    format(a,sizeof a,"Your job is: %s",GetJobName(Job[playerid]));
    SendClientMessage(playerid,-1,a);
    return 1;
}
arakuta is offline   Reply With Quote
Old 25/01/2013, 01:17 PM   #3
-=Dar[K]Lord=-
Huge Clucker
 
-=Dar[K]Lord=-'s Avatar
 
Join Date: Oct 2012
Posts: 351
Reputation: 48
Default Re: Remove from vehicle/other

For First Problem The Solution is remove that GetPlayerVehicleSeat and for second is add cases like

add

pawn Code:
new Job_Player[256];// top of your script

and then in /stats command add this:-

pawn Code:
case 1: Job_Player = "Farmer";
case 2: JJob_Player = "Trucker";
// and so on if you have more add case 3: and all do like i did

in the format(...
add '%s' After that 'Job: %d' if you want u can do it in brackets and then at where u put that job variable after that put 'Job_Player'

forex:-
pawn Code:
format(string,sizeof(string),"Job : %d [%s]",/*here the variable of your job*/,Job_Player);
__________________
Discussion is an exchange of knowledge; argument is an exchange of ignorance...- Robert Quillen

At times, it is better to keep your mouth shut and let people wonder if you are a fool than to open it and remove all their doubts - James Sinelair
-=Dar[K]Lord=- is offline   Reply With Quote
Old 25/01/2013, 03:07 PM   #4
edzis84
Big Clucker
 
edzis84's Avatar
 
Join Date: Jan 2013
Location: Latvia
Posts: 152
Reputation: 26
Default AW: Remove from vehicle/other

Thanks guys, helpet a lot!
edzis84 is offline   Reply With Quote
Old 25/01/2013, 07:49 PM   #5
edzis84
Big Clucker
 
edzis84's Avatar
 
Join Date: Jan 2013
Location: Latvia
Posts: 152
Reputation: 26
Default AW: Remove from vehicle/other

anyone?
edzis84 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
Remove vehicle Ratchet_xD Scripting Help 3 14/08/2012 09:36 PM
Won't remove player from the RC vehicle. Makaveli93 Scripting Help 5 27/06/2012 05:52 AM
Remove vehicle help. viddo Scripting Help 3 21/12/2011 08:06 AM
Remove vehicle by ID Unknown123 Help Archive 6 06/03/2011 03:02 PM
Remove from vehicle Steven82 Help Archive 2 01/04/2010 10:23 AM


All times are GMT. The time now is 07:37 AM.


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