Como Escolher uma profissao e nascer em uma base propria
#1

Eu quero Criar no GM "MUCA" quando as pessoas escolhe uma prof elas nasce na base:


(exemplo)
Cor
Quote:

#define C_Nassa 0x487CB9AA

ID
Quote:

#define Nassa 64

Salario
Quote:

#define Salario_Nassa 50000

Quote:

if(dini_Int(file, "Profissao") == Nassa){
SendClientMessage(playerid, C_Swat,"~~~~~~~~~~~~~~ Oficial da Nassa ~~~~~~~~~~~~~~");
SendClientMessage(playerid, Branco,"/pegararmas [id]");
SendClientMessage(playerid, Branco,"/algemar [id]");
SendClientMessage(playerid, Branco,"/desalgemar [id]");
SendClientMessage(playerid, Branco,"/prender [id]");
SendClientMessage(playerid, Branco,"/multar [id] [Quantia]");
SendClientMessage(playerid, Branco,"/ad - /fd");
SendClientMessage(playerid, Branco,"/ad2 - /fd2");
SendClientMessage(playerid, Branco,"/cp - Chat Profissгo.");
SendClientMessage(playerid, Branco,"/paradoai [ID]");
SendClientMessage(playerid, Branco,"/abrira51 - /fechara51");
SendClientMessage(playerid, C_Nassa,"~~~~~~~~~~~~~~ Oficil da Nassa ~~~~~~~~~~~~~~");
}

Quote:

if(listitem == 11)
{
if(dini_Int(file, "Level")> 130 && dini_Int(file, "Faculdade")> 71 && dini_Int(file, "Carteira") == 1){
SendClientMessage(playerid, 0x80FF00AA, "[INFO] Profissгo alterada com sucesso, agora vocк й um Oficial da nassa.");
SendClientMessage(playerid, 0x80FF00AA, "[INFO] Veja os comandos de sua profissгo, Digite: /profissao.");
PlayerPlaySound(playerid, 1057, 0, 0, 0);
SetPlayerSkin(playerid, 285);
dini_IntSet(file, "Profissao", 64);
Logarprof(playerid);
} else {
format(string, sizeof(string), "Requer: %d/130 De level, %d/71 Meses de estudo.E uma carteira de trabalho",dini_Int(file, "Level"), dini_Int(file, "Faculdade"));
SendClientMessage(playerid, Vermelho, string);
}
}

Salario
Quote:

if(dini_Int(file, "Profissao") == Nassa){
dini_IntSet(file, "SaldoBancario", dini_Int(file, "SaldoBancario")+Salario_Nassa);
format(string, sizeof(string), "[INFO] Vocк tem um emprego e recebeu seu sбlario: %d R$",Salario_Nassa);
SendClientMessage(i, 0xCAFF95AA, string);
}

como eu faзo pra qnd alguem escolhe essa prof ela vai teleportada direto pra area 51??
Reply
#2

Qual й a variбvel que vocк usa para detetar qual a organizaзгo/gang do jogador?
Exemplo:
pawn Код:
if( PlayerInfo[ playerid ][ pMember ] = 105 ) //105 й apenas um exemplo
Reply
#3

OnPlayerSpawn
pawn Код:
NascerBase(playerid);
pawn Код:
stock NascerBase(playerid)
{
    if(Profissao[playerid] == POLICIAL
    {
        SetPlayerPos(playerid,...)
        SetPlayerFacingAngle(...)
        SetPlayerSkin(...)
        return 1;
    }
Reply
#4

Primeiramente, nгo sabemos se ele usa essa variбvel.
Mas se usar, para quк uma funзгo no OnPlayerSpawn desnecessбria?
Poderia colocar logo:
pawn Код:
public OnPlayerSpawn(playerid)
{
   if( Profissao[ playerid ] == POLICIAL )
   {
      SetPlayerPos( playerid, /*Float:X*/, /*Float:Y*/, /*Float:Z*/ );
      SetPlayerSkin( playerid, /*SkinID*/ );
      //Outras funзхes ...
   }
   return true;
}
Isto foi sу para explicar ao JOKERBOY que era desnecessбrio chamar funзхes como ele fez.
Reply
#5

Aham, entendi..

Mas as vezes ele tem 20PROF e ocuparia muito espaзo no OnPlayerSpawn..

--
Mas de qualquer jeito valeu a iNFO =D
Reply
#6

Quote:

SetPlayerFacingAngle(...)

precisa pega angulo?
onde eu pego?
Reply
#7

olha eu fiz assim
Quote:

{
if( Profissao[ playerid ] == Nassa )
{
SetPlayerPos(playerid,210.736,1921.337,17.193));
SetPlayerSkin( playerid,165);
}
return true;
}

deu erro sendo eles:
Quote:

C:\Documents and Settings\William_2\Desktop\Servidor Muca\Servidor Muca\gamemodes\MUCA.pwn(2024) : warning 219: local variable "X" shadows a variable at a preceding level
C:\Documents and Settings\William_2\Desktop\Servidor Muca\Servidor Muca\gamemodes\MUCA.pwn(2024) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Documents and Settings\William_2\Desktop\Servidor Muca\Servidor Muca\gamemodes\MUCA.pwn(2024) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\Documents and Settings\William_2\Desktop\Servidor Muca\Servidor Muca\gamemodes\MUCA.pwn(2066) : warning 219: local variable "aname" shadows a variable at a preceding level
C:\Documents and Settings\William_2\Desktop\Servidor Muca\Servidor Muca\gamemodes\MUCA.pwn(2097) : warning 219: local variable "aname" shadows a variable at a preceding level
C:\Documents and Settings\William_2\Desktop\Servidor Muca\Servidor Muca\gamemodes\MUCA.pwn(2241) : warning 219: local variable "aname" shadows a variable at a preceding level
C:\Documents and Settings\William_2\Desktop\Servidor Muca\Servidor Muca\gamemodes\MUCA.pwn(2280) : warning 219: local variable "aname" shadows a variable at a preceding level
C:\Documents and Settings\William_2\Desktop\Servidor Muca\Servidor Muca\gamemodes\MUCA.pwn(229 : warning 219: local variable "X" shadows a variable at a preceding level
C:\Documents and Settings\William_2\Desktop\Servidor Muca\Servidor Muca\gamemodes\MUCA.pwn(229 : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Documents and Settings\William_2\Desktop\Servidor Muca\Servidor Muca\gamemodes\MUCA.pwn(229 : warning 219: local variable "Z" shadows a variable at a preceding level
C:\Documents and Settings\William_2\Desktop\Servidor Muca\Servidor Muca\gamemodes\MUCA.pwn(2346) : error 017: undefined symbol "Profissao"
C:\Documents and Settings\William_2\Desktop\Servidor Muca\Servidor Muca\gamemodes\MUCA.pwn(2346) : warning 215: expression has no effect
C:\Documents and Settings\William_2\Desktop\Servidor Muca\Servidor Muca\gamemodes\MUCA.pwn(2346) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\William_2\Desktop\Servidor Muca\Servidor Muca\gamemodes\MUCA.pwn(2346) : error 029: invalid expression, assumed zero
C:\Documents and Settings\William_2\Desktop\Servidor Muca\Servidor Muca\gamemodes\MUCA.pwn(2346) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Reply
#8

pawn Код:
if( Profissao[ playerid ] == Nassa )
{
SetPlayerPos(playerid,210.736,1921.337,17.193));
SetPlayerSkin( playerid,165);
return true;
}
DICA : TODA CHAVE QUE ABRE, FECHA.
Reply
#9

elri ele colocou { { & } }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)