On player spawn select team help plz!! (no one is going to help me? :sad:) -
Captain_Mani - 14.09.2011
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
Re: On player spawn select team help plz!! -
Universal - 14.09.2011
Theres a function:
GameTextForPlayer
Re: On player spawn select team help plz!! -
Captain_Mani - 14.09.2011
Quote:
Originally Posted by Universal
|
but i want a message that comes when we r choosing the skin... plz help me with that...
Re: On player spawn select team help plz!! -
Universal - 14.09.2011
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...
Re: On player spawn select team help plz!! -
Kaperstone - 14.09.2011
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;
}
Re: On player spawn select team help plz!! -
Captain_Mani - 14.09.2011
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.