Dialog Problem
#1

Hey guys

My problem: If I step in a checkpoint for capture a flag it shows a dialog ( 1 for buying vehicle ) but the the capturing works. If I step into a checkpoint for buying a vehicle, it says your capturing a zone and the dialog shows up.

How to fix? I'll post the codes


PS: I am using a filterscript for the carshop dialog

Filterscript code:

PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(
CarCP[playerid] == 0)
    {
       
PlayerPlaySound(playerid10570.00.00.0);
       
ShowPlayerDialog(playerid21DIALOG_STYLE_LIST"Cars""Landstalker  ($125,000)\nElegy ($200,000)\nInfernus  ($500,000)\nSultan   ($350,000)\nFlash   ($300,000)\nBuffalo   ($475,000)\nMonster   ($775,000)\nCheetah   ($375,555)\nSlamvan   ($430,000)\nFortune   ($450,550)\nBullet   ($475,550)\nAdmiral   ($175,000)\nHotknife   ($490,000)\nElegant   ($403, 500)\nSuper-Gt   ($498,500)\nZr-350   ($475,550)""Buy""Cancel");
       
CarCP[playerid] = 0;
    }
    return 
1;

From my gamemode ( capture zone ):

PHP код:
//snakes farm
    
CP[SNAKE] = CreateDynamicCP(-36.54582347.642624.1406,3, -1,-1,-1,100.0);
    
Zone[SNAKE] = GangZoneCreate(-62.5000000000005,2318.359375,23.4375,2390.625);
    
//area 51
    
CP[BIG] = CreateDynamicCP(10.9908,2008.8751,17.6406,3, -1,-1,-1,100.0);
    
Zone[BIG] = GangZoneCreate(-66.875,1900.265625,100.828125,2115.234375);
    
//army hotel
    
CP[ARMY] = CreateDynamicCP(37.7949,2242.1582,126.4790,3, -1,-1,-1,100.0);
    
Zone[ARMY] = GangZoneCreate(-2.3932912210.00732469.6067042274.007324);
    
//Airport
    
CP[AIRPORT] = CreateDynamicCP(408.1432,2450.1574,16.5,3, -1,-1,-1,100.0);
    
Zone[AIRPORT] = GangZoneCreate(89.0625000000005,2418.75,466.40625,2617.96875);
    
//PetrolBunk
    
CP[PETROL] = CreateDynamicCP(-26.2310,2442.2827,32.3008,3, -1,-1,-1,100.0);
    
Zone[PETROL] = GangZoneCreate(-73.8976132402.56787114.1023822482.567871); 
Reply
#2

try
pawn Код:
public OnPlayerEnterDynamicCheckpoint(playerid)
Reply
#3

Quote:
Originally Posted by Sascha
Посмотреть сообщение
try
pawn Код:
public OnPlayerEnterDynamicCheckpoint(playerid)
C:\Users\Administrator\Desktop\TESTSERVER\filtersc ripts\CarShop.pwn(3 : warning 235: public function lacks forward declaration (symbol "OnPlayerEnterDynamicCheckpoint")
Reply
#4

Anyone?
Reply
#5

Quote:
Originally Posted by Sascha
Посмотреть сообщение
try
pawn Код:
public OnPlayerEnterDynamicCheckpoint(playerid)
WTF.
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(CarCP[playerid] == 0)
    {
       PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
       ShowPlayerDialog(playerid, 21, DIALOG_STYLE_LIST, "Cars", "Landstalker  ($125,000)\nElegy ($200,000)\nInfernus  ($500,000)\nSultan   ($350,000)\nFlash   ($300,000)\nBuffalo   ($475,000)\nMonster   ($775,000)\nCheetah   ($375,555)\nSlamvan   ($430,000)\nFortune   ($450,550)\nBullet   ($475,550)\nAdmiral   ($175,000)\nHotknife   ($490,000)\nElegant   ($403, 500)\nSuper-Gt   ($498,500)\nZr-350   ($475,550)", "Buy", "Cancel");
       CarCP[playerid] = 0;
    }
    return 1;
}
If this didn't work, then i need to know:
- Is the checkpoint dynamic?
- Show me the global variable CarCP
- Show me how you created the car checkpoint.
Reply
#6

Quote:
Originally Posted by Ralfie
Посмотреть сообщение
WTF.
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(CarCP[playerid] == 0)
    {
       PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
       ShowPlayerDialog(playerid, 21, DIALOG_STYLE_LIST, "Cars", "Landstalker  ($125,000)\nElegy ($200,000)\nInfernus  ($500,000)\nSultan   ($350,000)\nFlash   ($300,000)\nBuffalo   ($475,000)\nMonster   ($775,000)\nCheetah   ($375,555)\nSlamvan   ($430,000)\nFortune   ($450,550)\nBullet   ($475,550)\nAdmiral   ($175,000)\nHotknife   ($490,000)\nElegant   ($403, 500)\nSuper-Gt   ($498,500)\nZr-350   ($475,550)", "Buy", "Cancel");
       CarCP[playerid] = 0;
    }
    return 1;
}
If this didn't work, then i need to know:
- Is the checkpoint dynamic?
- Show me the global variable CarCP
- Show me how you created the car checkpoint.
: warning 235: public function lacks forward declaration (symbol "OnPlayerEnterDynamicCP")
Reply
#7

Please help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)