Really much help needed
#2

Tested with this code and all compiles perfectly no errors

PHP код:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
#define GREEN 0x00FF00FF
#define COLOR_ORANGE 0xFF9900FF
#define DIALOG_REGISTER 100
#define COL_White 0xFFFFFFFF
public OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Blank Filterscript by your name here");
    print(
"--------------------------------------\n");
    return 
1;
}
public 
OnFilterScriptExit()
{
    return 
1;
}
#else
main()
{
    print(
"\n----------------------------------");
    print(
" Blank Gamemode by your name here");
    print(
"----------------------------------\n");
}
#endif
public OnGameModeInit()
{
    
// Don't use these lines if it's a filterscript
    
SetGameModeText("Blank Script");
    
AddPlayerClass(01958.37831343.157215.3746269.1425000000);
    return 
1;
}
public 
OnGameModeExit()
{
    return 
1;
}
public 
OnPlayerRequestClass(playeridclassid)
{
    
SetPlayerPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraLookAt(playerid1958.37831343.157215.3746);
    return 
1;
}
public 
OnPlayerConnect(playerid)
{
    return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    return 
1;
}
public 
OnPlayerDeath(playeridkilleridreason)
{
    return 
1;
}
public 
OnVehicleSpawn(vehicleid)
{
    return 
1;
}
public 
OnVehicleDeath(vehicleidkillerid)
{
    return 
1;
}
public 
OnPlayerText(playeridtext[])
{
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/w"cmdtexttrue2) == 0)
    {
        
ShowPlayerDialog(playerid9999DIALOG_STYLE_LIST"Choose a beer""Beer\nBeer\nBeer\nBeer\nBeer\nBeer\nBeer\nBeer","Beer","Beer");
  
//ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]); (I just used this for reference)
        
return 1;
    }
    return 
0;
}
public 
OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    return 
1;
}
public 
OnPlayerExitVehicle(playeridvehicleid)
{
    return 
1;
}
public 
OnPlayerStateChange(playeridnewstateoldstate)
{
    return 
1;
}
public 
OnPlayerEnterCheckpoint(playerid)
{
    return 
1;
}
public 
OnPlayerLeaveCheckpoint(playerid)
{
    return 
1;
}
public 
OnPlayerEnterRaceCheckpoint(playerid)
{
    return 
1;
}
public 
OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 
1;
}
public 
OnRconCommand(cmd[])
{
    return 
1;
}
public 
OnPlayerRequestSpawn(playerid)
{
    return 
1;
}
public 
OnObjectMoved(objectid)
{
    return 
1;
}
public 
OnPlayerObjectMoved(playeridobjectid)
{
    return 
1;
}
public 
OnPlayerPickUpPickup(playeridpickupid)
{
    return 
1;
}
public 
OnVehicleMod(playeridvehicleidcomponentid)
{
    return 
1;
}
public 
OnVehiclePaintjob(playeridvehicleidpaintjobid)
{
    return 
1;
}
public 
OnVehicleRespray(playeridvehicleidcolor1color2)
{
    return 
1;
}
public 
OnPlayerSelectedMenuRow(playeridrow)
{
    return 
1;
}
public 
OnPlayerExitedMenu(playerid)
{
    return 
1;
}
public 
OnPlayerInteriorChange(playeridnewinterioridoldinteriorid)
{
    return 
1;
}
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    return 
1;
}
public 
OnRconLoginAttempt(ip[], password[], success)
{
    return 
1;
}
public 
OnPlayerUpdate(playerid)
{
    return 
1;
}
public 
OnPlayerStreamIn(playeridforplayerid)
{
    return 
1;
}
public 
OnPlayerStreamOut(playeridforplayerid)
{
    return 
1;
}
public 
OnVehicleStreamIn(vehicleidforplayerid)
{
    return 
1;
}
public 
OnVehicleStreamOut(vehicleidforplayerid)
{
    return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == 9999)
    {
        if(!
response) return SendClientMessage(playeridGREEN"You have closed the shop without buying anything.");
        {
             new 
pCash;
             
pCash GetPlayerMoney(playerid);
             if(
GetPlayerMoney(playerid) < 200) return SendClientMessage(playeridCOLOR_ORANGE"You don't have enough money to puchase anything in the shop.");
             switch(
listitem)
                {
                     case 
0:
                    {
                        if(
pCash 200) return SendClientMessage(playerid, -1"You do not have enough money.");
                        
GivePlayerWeapon(playerid22150);
                        
GivePlayerMoney(playerid,-200);
                    }
                    case 
1:
                    {
                        if(
pCash 1000) return SendClientMessage(playerid, -1"You do not have enough money.");
                        
GivePlayerWeapon(playerid23150);
                        
GivePlayerMoney(playerid,-1000);
                   }
                   case 
2:
                   {
                       if(
pCash 1500) return SendClientMessage(playerid, -1"You do not have enough money.");
                       
GivePlayerWeapon(playerid24150);
                       
GivePlayerMoney(playerid,-1500);
                   }
                   case 
3:
                   {
                       if(
pCash 1500) return SendClientMessage(playerid, -1"You do not have enough money.");
                       
GivePlayerWeapon(playerid29150);
                       
GivePlayerMoney(playerid,-1500);
                   }
                   case 
4:
                   {
                       if(
pCash 1500) return SendClientMessage(playerid, -1"You do not have enough money.");
                       
GivePlayerWeapon(playerid25150);
                       
GivePlayerMoney(playerid,-1500);
                   }
                   case 
5:
                   {
                       if(
pCash 3500) return SendClientMessage(playerid, -1"You don't have enough money.");
                       
GivePlayerWeapon(playerid27150);
                       
GivePlayerMoney(playerid,-3500);
                   }
                   case 
6:
                   {
                       if(
pCash 4500) return SendClientMessage(playerid, -1"You don't have enough money.");
                       
GivePlayerWeapon(playerid30200);
                       
GivePlayerMoney(playerid,-4500);
                   }
                   case 
7:
                   {
                       if(
pCash 5000) return SendClientMessage(playerid, -1"You don't have enough money.");
                       
GivePlayerWeapon(playerid31200);
                       
GivePlayerMoney(playerid,-5000);
                   }
                   case 
8:
                   {
                       if(
pCash 4500) return SendClientMessage(playerid, -1"You don't have enough money.");
                       
GivePlayerWeapon(playerid34150);
                       
GivePlayerMoney(playerid,-4500);
                   }
             }
        }
    }
return 
1;
}
public 
OnPlayerClickPlayer(playeridclickedplayeridsource)
{
    return 
1;

Reply


Messages In This Thread
Really much help needed - by HighPitchedVoice - 29.06.2012, 13:35
Re: Really much help needed - by Neil. - 29.06.2012, 13:44
Re: Really much help needed - by HighPitchedVoice - 29.06.2012, 13:56
Re: Really much help needed - by Cxnnor - 29.06.2012, 13:58
Re: Really much help needed - by HighPitchedVoice - 29.06.2012, 14:00

Forum Jump:


Users browsing this thread: 2 Guest(s)