[HELP ME IF U CAN]
#1

Hello Guys How to make a Police Spawn as Blue Color ?

Code Of Spawn Police
Код:
//Cops Spawn
    AddPlayerClass(286,2598.8291,2146.1592,10.8203,355.7550,0,0,0,0,0,0);// Cop Spawn
    AddPlayerClass(288,2296.4009,2459.3684,10.8203,94.5504,0,0,0,0,0,0); // Cop Spawn
    AddPlayerClass(281,2292.3000,2465.9094,3.5313,358.9471,0,0,0,0,0,0); // Cop Spawn
Proof

Reply
#2

Skin selection?
Reply
#3

noo not skin selection I Mean when a Cop Joined his take color BLUE See this ERROR In Screenshot Its say you aren't cop and i was cop how to fix it
Reply
#4

Well you will have to make a case for it(As I saw from your Signature CNR). 1 team 1 case. For example,
LSPD 3 skins
case 1,2,3:
etc I will give you an example: also you will have to choose the skin team(Add team color)
PHP код:
case (add the skin case here):
{
SetPlayerPos(playerid1579.7782,-1637.2153,13.5523);
SetPlayerFacingAngle(playerid0);
SetPlayerCameraPos(playerid1579.7671,-1634.1367,13.5624);
SetPlayerCameraLookAt(playerid1579.7782,-1637.2153,13.5523);
GameTextForPlayer(playerid"~w~ Los Santos ~b~Police Department"50005);
ApplyAnimation(playerid"COP_AMBIENT""Coplook_think"4.1011111);
SetPlayerColor(playerid0x8080FFFF);
gTeam[playerid] = TEAM_LSPD;

Also check SetPlayerColor
Reply
#5

There is a 1 error

Код:
C:\Users\Alomari\Desktop\SAMP Server\gamemodes\LVCNR.pwn(166) : error 010: invalid function or declaration
when i type the skin id

Код:
case (skin 286):
{
SetPlayerPos(playerid, 2598.2598,-2146.1592,10.8203);
SetPlayerFacingAngle(playerid, 0);
SetPlayerCameraPos(playerid, 1579.7671,-1634.1367,13.5624);
SetPlayerCameraLookAt(playerid, 1579.7782,-1637.2153,13.5523);
GameTextForPlayer(playerid, "~g~ LVPD ~b~Police Department", 5000, 5);
ApplyAnimation(playerid, "COP_AMBIENT", "Coplook_think", 4.1, 0, 1, 1, 1, 1, 1);
SetPlayerColor(playerid, 0x8080FFFF);
gTeam[playerid] = TEAM_LVPD;
}
Reply
#6

Quote:
Originally Posted by RedRex
Посмотреть сообщение
There is a 1 error

Код:
C:\Users\Alomari\Desktop\SAMP Server\gamemodes\LVCNR.pwn(166) : error 010: invalid function or declaration
when i type the skin id

Код:
case (skin 286):
{
SetPlayerPos(playerid, 2598.2598,-2146.1592,10.8203);
SetPlayerFacingAngle(playerid, 0);
SetPlayerCameraPos(playerid, 1579.7671,-1634.1367,13.5624);
SetPlayerCameraLookAt(playerid, 1579.7782,-1637.2153,13.5523);
GameTextForPlayer(playerid, "~g~ LVPD ~b~Police Department", 5000, 5);
ApplyAnimation(playerid, "COP_AMBIENT", "Coplook_think", 4.1, 0, 1, 1, 1, 1, 1);
SetPlayerColor(playerid, 0x8080FFFF);
gTeam[playerid] = TEAM_LVPD;
}
Don't add skin ID, add the skin case for example - at class selection

PHP код:
    AddPlayerClass(286,2598.8291,2146.1592,10.8203,355.7550,0,0,0,0,0,0);// Cop Spawn - Case 1
    
AddPlayerClass(288,2296.4009,2459.3684,10.8203,94.5504,0,0,0,0,0,0); // Cop Spawn - Case 2 
    
AddPlayerClass(281,2292.3000,2465.9094,3.5313,358.9471,0,0,0,0,0,0); // Cop Spawn - Case 3 
PHP код:
case 1,2,3:
{
SetPlayerPos(playerid2598.2598,-2146.1592,10.8203);
SetPlayerFacingAngle(playerid0);
SetPlayerCameraPos(playerid1579.7671,-1634.1367,13.5624);
SetPlayerCameraLookAt(playerid1579.7782,-1637.2153,13.5523);
GameTextForPlayer(playerid"~g~ LVPD ~b~Police Department"50005);
ApplyAnimation(playerid"COP_AMBIENT""Coplook_think"4.1011111);
SetPlayerColor(playerid0x8080FFFF);
gTeam[playerid] = TEAM_LVPD;

Reply
#7

Look as that right ?
Код:
AddPlayerClass(286,2598.8291,2146.1592,10.8203,355.7550,0,0,0,0,0,0);// Cop Spawn - Case 1
    AddPlayerClass(288,2296.4009,2459.3684,10.8203,94.5504,0,0,0,0,0,0); // Cop Spawn - Case 2
    AddPlayerClass(281,2292.3000,2465.9094,3.5313,358.9471,0,0,0,0,0,0); // Cop Spawn - Case 3
and the case
Код:
case 1,2,3):
{
SetPlayerPos(playerid, 2598.2598,-2146.1592,10.8203);
SetPlayerFacingAngle(playerid, 0);
SetPlayerCameraPos(playerid, 1579.7671,-1634.1367,13.5624);
SetPlayerCameraLookAt(playerid, 1579.7782,-1637.2153,13.5523);
GameTextForPlayer(playerid, "~g~ LVPD ~b~Police Department", 5000, 5);
ApplyAnimation(playerid, "COP_AMBIENT", "Coplook_think", 4.1, 0, 1, 1, 1, 1, 1);
SetPlayerColor(playerid, 0x8080FFFF);
gTeam[playerid] = TEAM_LVPD;
}
its not work
Reply
#8

PHP код:
case 1,2,3:
{
SetPlayerPos(playerid2598.2598,-2146.1592,10.8203);
SetPlayerFacingAngle(playerid0);
SetPlayerCameraPos(playerid1579.7671,-1634.1367,13.5624);
SetPlayerCameraLookAt(playerid1579.7782,-1637.2153,13.5523);
GameTextForPlayer(playerid"~g~ LVPD ~b~Police Department"50005);
ApplyAnimation(playerid"COP_AMBIENT""Coplook_think"4.1011111);
SetPlayerColor(playerid0x8080FFFF);
gTeam[playerid] = TEAM_LVPD;

Do you have other skins? also does the script knows LVPD?
Reply
#9

yes i have other skins take this
Код:
//SWAT
    AddPlayerClass(285,1311.3173,1256.3123,10.8203,339.5134,0,0,0,0,0,0); //
Reply
#10

What Maddox told you is completely correct, although thing is, that the "case" is depending on the order you have added the skins...
To solve it without the case thing on the OnPlayerRequest class is to use a check which skin is set at "OnPlayerSpawn"
Код:
public OnPlayerSpawn(playerid)
{
    new skin = GetPlayerSkin(playerid);
    if(skin == 281 || skin == 286 || skin == 288)
    {
        SetPlayerColor(playerid, 0x8080FFFF); 
    }
    return 1;
}
This will be independent by the order of your "AddPlayerClass" entries.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)