Como criar pickup
#1

Eu sou novo nessa area de pwn e ainda nгo sei criar pickup e quero fazer um pickup de creditos e tals ja tenho esquematizado de como vai ser mas nгo sei criar ainda se alguem puder me ajudar como sou novo tem que explicar aonde colocar. E tbm quero saber como pega as cordenadas
Reply
#2

Topo do gm:
pawn Код:
new PickupCreditos;
Em OnGameModeInit:
pawn Код:
PickupCreditos = CreatePickup(1239,1,coord.x,coord.y,coord.z,0);
Como criar pickup: https://sampwiki.blast.hk/wiki/CreatePickup

Em OnPlayerPickUpPickup vocк poe:
pawn Код:
if(pickupid == PickupCreditos)
{
   //funзгo (SendClientMessage ou ShowPlayerDialog para mostrar os creditos)
   return 1;
}
Reply
#3

Eu queria fazer um pickup que quando eu passasse por cima e apertace f mostraria os creditos desejados
Reply
#4

Na public OnPlayerKeyStateChange coloque:
pawn Код:
if(newkeys == 16)  
{
   if(IsPlayerInRange(playerid,2.0, coordenadas do pickup))
   {
      //Funзao pra mostrar os creditos (SendClientMessage ou ShowPlayerDialog)
   }
}
Caso seu GM nгo tenha a public:
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
   if(newkeys == 16)  
   {
     if(IsPlayerInRangeOfPoint(playerid,2.0, coordenadas do pickup))
     {
        //Funзao pra mostrar os creditos (SendClientMessage ou ShowPlayerDialog)
     }
   }
   return 1;
}
E o resto continua o mesmo.
topo:
pawn Код:
new PickupCreditos;
Em OnGameModeInit
pawn Код:
PickupCreditos = CreatePickup(1239,1,coord.x,coord.y,coord.z,0);
E jб que vocк quer que aperte F esqueзa entao da public OnPlayerPickUpPickup, caso tenha colocado algo nela jб, delete.
Reply
#5

Pegue o codigo do humildade forever;
Menos a parte de OnPlayerPickUpPickup;
Crie um /creditos a seu gosto;
Em OnPlayerKeyStateChange coloca isso:

pawn Код:
if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
     if(IsPlayerInRangeOfPoint(playerid,2,PICKUPX,PICKUPY,PICKUPZ) return  OnPlayerCommandText(playerid,"/creditos");
}
Reply
#6

vlw mas eu esqueci de fazer um backup e deu isso
Quote:

C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(2520) : error 004: function "SaveAdminLideres" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(2525) : error 004: function "OnPropUpdate" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(2526) : error 004: function "SaveCK" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(2527) : error 004: function "SaveIRC" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(252 : error 004: function "SavePapers" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(2529) : error 004: function "SalvarTerritorio" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(2530) : error 004: function "SaveBoxer" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(2531) : error 004: function "SaveCars" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(2532) : error 004: function "SaveVip" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(2533) : error 004: function "LoadAdminLideres" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(2534) : error 004: function "LoadCar" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(2535) : error 004: function "LoadVip" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(4085) : error 017: undefined symbol "GivePlayerMoneyEx"
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(4114) : error 017: undefined symbol "GivePlayerMoneyEx"
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(4232) : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(423 : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(4266) : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(4272) : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(4292) : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(432 : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(4344) : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(4350) : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(4356) : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(4362) : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(436 : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(4374) : error 004: function "OnPlayerCommandText" is not implemented

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


26 Errors.

Reply
#7

Й alguma chave que nгo foi fechada, poste os code como vocк colocou, deve ter sido na public OnPlayerKeyStateChange!
Reply
#8

ja recuperei eu lembrei que eu tinha um bloco de notas com o gm todo aberto pq eu to imigrando de serve eu tava com uma galera antes agora to indo pra outra e eu abrir o bloco de notas para poder usar o ctrl-H e nгo fechei
Reply
#9

deu isso agora
Quote:

C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(75371) : error 017: undefined symbol "IsPlayerInRange"
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(75371) : warning 202: number of arguments does not match definition
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(75371) : error 001: expected token: ",", but found "do"
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(75371) : error 017: undefined symbol "pickup"
C:\Users\Gustavo\Desktop\btg\gamemodes\SAMPFOREVER N.PWN(75371) : 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
#10

Quote:
Originally Posted by GustavoPontes
Посмотреть сообщение
deu isso agora
Й IsPlayerInRangeOfPoint, desculpe-me, digitei errado e nem vi
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)