On player spawn select team help plz!!
#1

Hello guys,
This time i want a help from u guys that when we connect to the server in the player skin selection, (Think there r two teams like Cops and Robbers) i want a message coming in the main screen when we changing the skins... like if we go to the cops skin then a message will come in the middle of the screen that this is "COPS team".. like that.. How do i do like that?? plz help ASAP
Reply
#2

Theres a function: GameTextForPlayer
Reply
#3

Quote:
Originally Posted by Universal
Посмотреть сообщение
Theres a function: GameTextForPlayer
but i want a message that comes when we r choosing the skin... plz help me with that...
Reply
#4

Quote:
Originally Posted by Captain_Mani
Посмотреть сообщение
but i want a message that comes when we r choosing the skin... plz help me with that...
In this callback:
pawn Код:
public OnPlayerRequestClass( playerid, classid )
Check what classid player have chosen and display the message if its a cop or if its a terrorist...
Reply
#5

here:
pawn Код:
public OnGameModeInIt()
{
// Case 0
    AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
// Case 1
    AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
// Case 2
    AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
}


public OnPlayerRequestClass(playerid,classid)
{
    if(classid == 0) {
        GameTextForPlayer(playerid,"This Is Skin Number 1",3000,5);
        else if(classid == 1) {
            GameTextForPlayer(playerid,"This Is Skin Number 2",3000,5);
            else if(classid == 2) {
                GameTextForPlayer(playerid,"This Is Skin Number 3",3000,5);
            }
        }
    }
    return 1;
}
for example:
pawn Код:
public OnGameModeInIt()
{
    AddPlayerClass(104,1979.1917,-1222.0964,25.1824,97.3597,0,0,0,0,0,0);
    AddPlayerClass(107,2508.5671,-1673.6665,13.3793,86.2585,0,0,0,0,0,0);
}


public OnPlayerRequestClass(playerid,classid)
{
    if(classid == 0) {
        GameTextForPlayer(playerid,"This Is Ballas skin",3000,5);
        else if(classid == 1) {
            GameTextForPlayer(playerid,"this is Grove skin",3000,5);
        }
    }
    return 1;
}
Reply
#6

Quote:
Originally Posted by xkirill
Посмотреть сообщение
here:
pawn Код:
public OnGameModeInIt()
{
// Case 0
    AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
// Case 1
    AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
// Case 2
    AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
}


public OnPlayerRequestClass(playerid,classid)
{
    if(classid == 0) {
        GameTextForPlayer(playerid,"This Is Skin Number 1",3000,5);
        else if(classid == 1) {
            GameTextForPlayer(playerid,"This Is Skin Number 2",3000,5);
            else if(classid == 2) {
                GameTextForPlayer(playerid,"This Is Skin Number 3",3000,5);
            }
        }
    }
    return 1;
}
for example:
pawn Код:
public OnGameModeInIt()
{
    AddPlayerClass(104,1979.1917,-1222.0964,25.1824,97.3597,0,0,0,0,0,0);
    AddPlayerClass(107,2508.5671,-1673.6665,13.3793,86.2585,0,0,0,0,0,0);
}


public OnPlayerRequestClass(playerid,classid)
{
    if(classid == 0) {
        GameTextForPlayer(playerid,"This Is Ballas skin",3000,5);
        else if(classid == 1) {
            GameTextForPlayer(playerid,"this is Grove skin",3000,5);
        }
    }
    return 1;
}
this didnt work it wont compile pleaz help me ASAP plz......
this is the error wht i get when i compile:

D:\Manitha\San Andreas Game & other\GTA San Andreas\GTA San Andreas\SAMP server\gamemodes\worldwar.pwn(134) : error 010: invalid function or declaration
D:\Manitha\San Andreas Game & other\GTA San Andreas\GTA San Andreas\SAMP server\gamemodes\worldwar.pwn(137) : error 010: invalid function or declaration
D:\Manitha\San Andreas Game & other\GTA San Andreas\GTA San Andreas\SAMP server\gamemodes\worldwar.pwn(142) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)