quick playerclass help. -
Mark_Weston - 06.07.2011
Hey there, I have a quick question
Well I forgot how to script that line.
It was for AddPlayerClass
It was about 3-5 lines long
AddPlayerClass
what weps
and interior
I am sorry for not giving much info but that all what I can remember :/
thanks for your time and help
Re: quick playerclass help. -
Kitten - 06.07.2011
I don't actually get what you mean by , Whats weps , interior?
Re: quick playerclass help. -
Mark_Weston - 07.07.2011
Quote:
Originally Posted by Kitten
I don't actually get what you mean by , Whats weps , interior?
|
There was a function/script
It looked something like this
note its not the same )
AddPlayerClass(280,1554.3741,-1675.6704,16.1953,89.4417,24,400,31,400,17,10);
Interior(0);
SendClientMessage("Welcome to the swat unit")
}
something like that.
Re: quick playerclass help. -
Kitten - 07.07.2011
GivePlayerWeapon(playerid,weapid,ammo);
SetPlayerInterior(playerid,interiorid); ?
Re: quick playerclass help. -
Markx - 07.07.2011
Maybe teams? If so, try
this, or
this.
Re: quick playerclass help. -
Mark_Weston - 07.07.2011
Quote:
Originally Posted by Kitten
GivePlayerWeapon(playerid,weapid,ammo);
SetPlayerInterior(playerid,interiorid); ?
|
Nope it was ALL in one line, so I can chose it for each team/class
Quote:
Originally Posted by Markx
|
Nope it was much shorter :/ man I need access to my old script so I can show you lol What I mean :/
but I don't have my old script
edit
Easier question:
How do I change this
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
so it shows all my classes ( I have them all in diff locations )
Re: quick playerclass help. -
Markx - 07.07.2011
Thats what i have showed you here example:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0:
{
//The first AddPlayerClass, SetPlayerPos, bla bla...
}
case 1:
{
//something here like SetPlayerCameraPos
}
}
}
Hope this helped.
Re: quick playerclass help. -
Mark_Weston - 07.07.2011
Quote:
Originally Posted by Markx
Thats what i have showed you here example:
pawn Код:
public OnPlayerRequestClass(playerid, classid) { switch(classid) { case 0: { //The first AddPlayerClass, SetPlayerPos, bla bla... } case 1: { //something here like SetPlayerCameraPos } } }
Hope this helped.
|
Yes that what I was looking for lol, stupid me it was all the time in front of me!
anyway
pawn Код:
if(classid == 0)
{
GameTextForPlayer(playerid,"~b~Police Officer LS",5000,3);
SendClientMessage(playerid, COLOR_GREEN, "Weapons You will get:");
SendClientMessage(playerid, COLOR_GREEN, "M4");
SendClientMessage(playerid, COLOR_GREEN, "Smoke Grande");
SendClientMessage(playerid, COLOR_GREEN, "Deagle");
SetPlayerCameraPos(playerid, -1675.6704,16.1953,89.4417);
}
What did I do wrong? No errors, but the camera position is wrong is shows me the Santa maria beach instead of LSPD
Re: quick playerclass help. -
=WoR=Varth - 07.07.2011
You sure you put the right coordinate?
Re: quick playerclass help. -
Mark_Weston - 07.07.2011
Quote:
Originally Posted by varthshenon
You sure you put the right coordinate?
|
Yes I did
Re: quick playerclass help. -
Markx - 07.07.2011
Use SetPlayerCameraLookAt and dont set it to the same coordinates as the SetPlayerCameraPos
Re: quick playerclass help. -
Mark_Weston - 07.07.2011
Quote:
Originally Posted by Markx
Use SetPlayerCameraLookAt and dont set it to the same coordinates as the SetPlayerCameraPos
|
now I see SF airport... On every class
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
if(classid == 0)
{
GameTextForPlayer(playerid,"~b~Police Officer LS",5000,3);
SendClientMessage(playerid, COLOR_GREEN, "Weapons You will get:");
SendClientMessage(playerid, COLOR_GREEN, "M4");
SendClientMessage(playerid, COLOR_GREEN, "Smoke Grande");
SendClientMessage(playerid, COLOR_GREEN, "Deagle");
SetPlayerCameraPos(playerid, -1675.6704,16.1953,89.4417);
SetPlayerCameraLookAt(playerid, -1675.6704,16.1953,89.4417);
SetPlayerInterior(playerid,0);
}
this is my number 1 class:
pawn Код:
else if(classid == 1)
{
GameTextForPlayer(playerid,"~b~SWAT Officer LS",5000,3);
SendClientMessage(playerid, COLOR_GREEN, "Weapons You will get:");
SendClientMessage(playerid, COLOR_GREEN, "M4");
SendClientMessage(playerid, COLOR_GREEN, "Smoke Grande");
SendClientMessage(playerid, COLOR_GREEN, "Deagle");
SetPlayerCameraPos(playerid, -1675.6704,16.1953,89.4417);
}
Just weird...