21.04.2017, 15:59
Quote:
A callback OnPlayeDeath do seu gamemode estб apenas isto?
Poste sua callback OnPlayerSpawn. |
onplayerspawn:
PHP код:
public OnPlayerSpawn(playerid)
{
if(cLogin[playerid] == 1){
new textob[64], jogador[MAX_PLAYER_NAME];
GetPlayerName(playerid,jogador,sizeof(jogador));
format(textob, sizeof(textob), "{FFFFFF}%s entrou no servidor!",jogador);
SendClientMessageToAll(1, textob);
SendClientMessage(playerid,-1, "{FFFFFF}Seja Bem Vindo!!");
TogglePlayerSpectating(playerid, 0);
TextDrawShowForPlayer(playerid, Textdraw1);
PlayerTextDrawShow(playerid, Textdraws0);
SetTimerEx("attstatus", 1000, true, "i", playerid );
SetPlayerColor(playerid, PlayerLogin[ playerid ][ cororg ]);
SetCameraBehindPlayer(playerid); //voltar a camera pro player
whileConnect[playerid] = 0; //Pra tirar o botгo de spawn
OnPlayerRequestClass(playerid, 0); //Pra tirar o botгo de spawn
cLogin[playerid] = 0;
}
//===============================NPC
if(IsPlayerNPC(playerid))
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, "Motorista", true))
{
PutPlayerInVehicle(playerid, Onibus[0], 0);
}
if(!strcmp(npcname, "Motorista2", true))
{
PutPlayerInVehicle(playerid, Onibus[1], 0);
}
if(!strcmp(npcname, "Motorista3", true))
{
PutPlayerInVehicle(playerid, Onibus[2], 0);
}
if(!strcmp(npcname, "Motorista4", true))
{
PutPlayerInVehicle(playerid, Onibus[3], 0);
}
if(!strcmp(npcname, "Motorista5", true))
{
PutPlayerInVehicle(playerid, Onibus[4], 0);
}
}
//===============================FIM NPC
return 1;
}