Help With Nick disapearing. -
Mataaltedi - 02.08.2012
Im spanish so sorry for my english, i know its horrible XD.
The trouble is that, when i enter to my server i can see all the nicks of other users but if i enter a car and then leave a car the nick of this person disapears ... When this person enter to some interior and then leave the nick turns to apear... Please HELP whats is the problem , the problems is when u leave from the car... what i chould change? so? THANKS
Re: Help With Nick disapearing. -
[MM]RoXoR[FS] - 02.08.2012
pawn Код:
//Under OnPlayerExitVehicle
ShowNameTags(1);
Respuesta: Help With Nick disapearing. -
Mataaltedi - 02.08.2012
Код HTML:
public OnPlayerExitVehicle(playerid, vehicleid)
{
ShowNameTags(1);
if (GetPlayerState(playerid) == 1)
{
return 1;
}
OnPropTextdrawUpdate();
if(IsAHarvest(vehicleid))
{
if(FarmerVar[playerid] == 1)
{
SetTimer("FarmerExit", 7000, 0);
GameTextForPlayer(playerid, "~n~~w~You have ~r~7~w~ seconds~n~to get back on a harvest", 5000, 3);
}
}
if(IsAJobPlane(vehicleid))
{
if(AirRoute[playerid] >= 1)
{
SetTimer("JobPlaneExit", 20000, 0);
GameTextForPlayer(playerid, "~n~~w~Tienes ~r~20~w~ segundos~n~para volver al avion", 5000, 3);
}
}
if(IsATrain(vehicleid))
{
if(TrainRoute[playerid] >= 1)
{
SetTimer("TrainPlaneExit", 20000, 0);
GameTextForPlayer(playerid, "~n~~w~Tienes ~r~20~w~ segundos~n~para volver al tren", 5000, 3);
}
}
if(IsADrugHarvest(vehicleid))
{
if(DrugFarmerVar[playerid] == 1)
{
SetTimer("DrugFarmerExit", 7000, 0);
GameTextForPlayer(playerid, "~n~~w~You have ~b~7~w~ seconds~n~to get back on a harvest", 5000, 3);
}
}
if(IsASmuggleCar(vehicleid))
{
if(SmugglerWork[playerid] == 1)
{
SetTimer("SmugglerExit", 7000, 0);
GameTextForPlayer(playerid, "~n~~w~You have ~r~7~w~ seconds~n~to get back in car", 5000, 3);
}
}
if(gGas[playerid] == 1)
{
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Left car", 500, 3);
}
if (BusrouteEast[playerid][0] != 0 || BusrouteWest[playerid][0] != 0)
{
BusrouteEnd(playerid, vehicleid);
}
if (IsABus(vehicleid))
{
for (new i=0; i<=MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if (BusrouteEast[i][0] != 0 && BusrouteEast[i][1] == vehicleid)
{
GameTextForPlayer(i, "~n~~n~~n~~n~~n~~n~~g~Passenger Left The Bus", 5000, 3);
}
else if (BusrouteWest[i][0] != 0 && BusrouteWest[i][1] == vehicleid)
{
GameTextForPlayer(i, "~n~~n~~n~~n~~n~~n~~g~Passenger Left The Bus", 5000, 3);
}
}
}
}
return 1;
}
//jex_lafer
public OnPlayerRequestClass(playerid, classid)
{
//PlayerPlaySound(playerid, 1183, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pModel] = Peds[classid][0];
if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
{
ClearChatbox(playerid, 10);
SendClientMessage(playerid, COLOR_YELLOW2, " ");
SendClientMessage(playerid, COLOR_YELLOW2, " ");
SendClientMessage(playerid, COLOR_YELLOW2, " ");
SendClientMessage(playerid, COLOR_YELLOW2, " ");
SendClientMessage(playerid, COLOR_YELLOW2, " ");
SendClientMessage(playerid, COLOR_YELLOW2, " ");
if (gPlayerAccount[playerid] != 0)
{
AntiKick = SetTimer("KickLogeo",15000,false);
new loginstring[128];
SendClientMessage(playerid, ORANGE, "Ingresa la contraseсa en 10 segundos o seras kickeado!")
format(loginstring,sizeof(loginstring),"{FFFFFF}Bienvenido a Nuestro {FFFFFF}Servidor Pistachos City Rp.\n{FFFFFF}Ingresa Tu Contraseсa Para Loguear.");
ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"{FFFFFF}Pistachos City RolePlay v3.0",loginstring,"Entrar","Salir");
}
else
{
gPlayerAccount[playerid] = 0;
new regstring[128];
format(regstring,sizeof(regstring),"{FFFFFF}Bienvenido a Nuestro Servidor.\n{FF0825}Esta Cuenta No Se Encuentra {FF0825}Registrada.\n{FF0825}Coloca Una Contraseсa.");
ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"{00FFFF}Pistachos City RolePlay v3.2",regstring,"Registrar","Salir");
}
SetPlayerCameraPos(playerid, 1521.0207519531 ,-1676.5791015625 ,12.852392196655);
SetPlayerCameraLookAt(playerid, 1524.6184082031 ,-1676.3280029297 ,12.899203300476);
PlayerInfo[playerid][pModel] = Peds[classid][0];
}
else SpawnPlayer(playerid);
return false;
}
I have this and now the names dont appear outdoor, nither outdoor... Please what i should to do... Now i cant see names ...
Re: Help With Nick disapearing. -
Ranama - 02.08.2012
You could have a timer that checks everybodys state, and if the state is PLAYER_STATE_ONFOOT you show their name and else you'll hide it.
like this:
Код:
OnGameModeInit(){
SetTimer("CheckState", 1000, true);
}
forward CheckState();
public CheckState(){
for(new i = 0; i < MAX_PLAYERS; i++){
if(GetPlayerState(i) == PLAYER_STATE_ONFOOT){
ShowPlayerTag(i, flase);//don't know about this command
}
else{
ShowPlayerTag(i, true);//don't know about this command
}
}
}
Respuesta: Help With Nick disapearing. -
Mataaltedi - 02.08.2012
But the trouble is that i want to show it ALLWAYS ...
Re: Help With Nick disapearing. -
Ranama - 02.08.2012
If you don't have the time to look it up in your code, add a timer that allways shows the nametag then, like this:
Код:
OnGameModeInit(){
SetTimer("CheckState", 1000, true);
}
forward CheckState();
public CheckState(){
for(new i = 0; i < MAX_PLAYERS; i++){
ShowPlayerTag(i, flase);//don't know about this command
}
}
Hope that helped and it works
Respuesta: Help With Nick disapearing. -
Mataaltedi - 02.08.2012
Код HTML:
C:\Users\tedi\Desktop\Nueva carpeta (2)\gamemodes\PistachoRP.pwn(4274) : error 017: undefined symbol "ShowPlayerTag"
C:\Users\tedi\Desktop\Nueva carpeta (2)\gamemodes\PistachoRP.pwn(4277) : error 017: undefined symbol "ShowPlayerTag"
C:\Users\tedi\Desktop\Nueva carpeta (2)\gamemodes\PistachoRP.pwn(7502) : error 021: symbol already defined: "CheckState"
C:\Users\tedi\Desktop\Nueva carpeta (2)\gamemodes\PistachoRP.pwn(7504) : error 017: undefined symbol "ShowPlayerTag"
C:\Users\tedi\Desktop\Nueva carpeta (2)\gamemodes\PistachoRP.pwn(20300) : warning 213: tag mismatch
C:\Users\tedi\Desktop\Nueva carpeta (2)\gamemodes\PistachoRP.pwn(28949) : warning 202: number of arguments does not match definition
C:\Users\tedi\Desktop\Nueva carpeta (2)\gamemodes\PistachoRP.pwn(14036) : warning 204: symbol is assigned a value that is never used: "artyomgaraje"
C:\Users\tedi\Desktop\Nueva carpeta (2)\gamemodes\PistachoRP.pwn(14032) : warning 204: symbol is assigned a value that is never used: "ivangate"
C:\Users\tedi\Desktop\Nueva carpeta (2)\gamemodes\PistachoRP.pwn(14032 -- 70720) : warning 203: symbol is never used: "wtime"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Im so noob on scripting...
Re: Help With Nick disapearing. -
Ranama - 02.08.2012
Код:
OnGameModeInit(){
SetTimer("CheckNameTagState", 1000, true);
}
forward CheckNameTagState();
public CheckNameTagState(){
for(new n = 0; n < MAX_PLAYERS; n++){
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(n, i, false);
}
}
That should work, the other errors is not done by me, you probably had them before.