I need help !
#1

Guys, hi all.
I have a big problem.
Not show me the dialog when i type /clothes in ZIP store...
t
PHP код:
CMD:clothes(playerid,params[])
{
    if(
gPlayerLogged[playerid] == 0) return SendClientMessage(playeridCOLOR_LIGHTRED"You need to login first.");
    if(
IsAtClothShop(playerid))
    {
        if(
PlayerInfo[playerid][pMember] >= && PlayerInfo[playerid][pLeader] == 0)
        {
            if(
IsPlayerConnected(playerid))
            {
                if(
GetPlayerCash(playerid) < 1500) return SCM(playerid,COLOR_WHITE,"{ED2D20}You do not have enough money($1,500).");
                
SBizzInfo[9][sbTill] += 1500;
                
SBizzInfo[9][sbProducts]--;
                
GivePlayerCash(playerid,-1500);
                new 
rand2 random(5);
                
SetPlayerVirtualWorld(playerid,rand2);
                
SetPlayerInterior(playerid,0);
                new 
rand random(sizeof(gInviteSpawns));
                
SetPlayerPos(playeridgInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
                
SetPlayerFacingAngle(playeridgInviteSpawns[rand][3]);
                
SetPlayerCameraPos(playerid,gInviteSpawns[rand][0] + 3gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
                
SetPlayerCameraLookAt(playerid,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
                
TogglePlayerControllable(playerid0);
                
SelectChar[playerid] = 255;
                
SelectCharID[playerid] = PlayerInfo[playerid][pMember];
                
SelectCharPlace[playerid] = 1;
                
PlayerInfo[playerid][pChar] = ChosenSkin[playerid];
                
ShowPlayerDialog(playeridDIALOG_CLOTHESDIALOG_STYLE_MSGBOX,"Clothes:""Press 'Next' to select the clothes.\nPress 'Done' once you have chosen the clothes.","Next""Done");
                new 
sendername[25],string[100];
                
GetPlayerName(playerid,sendername,sizeof(sendername));
                
format(stringsizeof(string), "UPDATE users SET Money='%d' WHERE name='%s'"GetPlayerCash(playerid), sendername);
                
mysql_query(SQL,string);
                
format(string,sizeof(string),"UPDATE `sbizz` SET `Till`='%d',`Products`='%d' WHERE `ID`='9'",SBizzInfo[9][sbTill],SBizzInfo[9][sbProducts]);
                
mysql_query(SQL,string);
            }
        }
    }
    else
    {
        
SCM(playerid,COLOR_WHITE,"{ED2D20}You're not the clothing store.");
    }
    return 
1;

Reply
#2

if(IsAtClothShop(playerid)) check IsatClithShop 's coords. I mean go that coords then try your command. If it not work then the problem is your callback
Reply
#3

ok i will try and tell you
Reply
#4

There's no ShowPlayerDialog code in there at all.
Reply
#5

I think there is.
PHP код:
ShowPlayerDialog(playeridDIALOG_CLOTHESDIALOG_STYLE_MSGBOX,"Clothes:""Press 'Next' to select the clothes.\nPress 'Done' once you have chosen the clothes.","Next""Done"); 
Reply
#6

pawn Код:
if(PlayerInfo[playerid][pMember] >= 1 && PlayerInfo[playerid][pLeader] == 0)
I will not show the dialog if the above statement is false which is your case.
Reply
#7

Can you give me an ideea how to change it ? D
Reply
#8

up ?
Reply
#9

I have a suggestion, this won't fix the problem
Код:
if(IsPlayerConnected(playerid))
The dialog is not shown because ShowPlayerDialog was never called.It could be because one of your ifs turned out to be false or the function execution failed due to some run-time error.

Replace your code with this and tell me what all were printed in the server window.
http://pastebin.com/xEtrPGL2
Reply
#10

look
PHP код:

----------
Loaded log file"server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7, (C)2005-2015 SA-MP Team

[12:16:56
[
12:16:56Server Plugins
[12:16:56] --------------
[
12:16:56]  Loading pluginsscanf
[12:16:56

[
12:16:56]  ===============================

[
12:16:56]       sscanf plugin loaded.     

[
12:16:56]          Version:  2.8.1        

[12:16:56]    (c2012 Alex "******" Cole  

[12:16:56]  ===============================

[
12:16:56]   Loaded.
[
12:16:56]  Loading pluginstreamer
[12:16:56

*** 
Streamer Plugin v2.7.5.2 by Incognito loaded ***

[
12:16:56]   Loaded.
[
12:16:56]  Loading pluginmysql
[12:16:56]  >> plugin.mysqlR38 successfully loaded.
[
12:16:56]   Loaded.
[
12:16:56]  Loaded 3 plugins.

[
12:16:56
[
12:16:56Filterscripts
[12:16:56] ---------------
[
12:16:56]   Loading filterscript 'vehicleattach.amx'...
[
12:16:56]  
[
12:16:56]  ======================================= 
[
12:16:56]  |                                     | 
[
12:16:56]  |        YSI version 1.04.0000        
[
12:16:56]  |        By Alex "******" Cole        
[
12:16:56]  |                                     | 
[
12:16:56]  ======================================= 
[
12:16:56]  
[
12:16:56Attach object to Vehicle by Siralos
[12:16:56]   Loading filterscript 'iTune.amx'...
[
12:16:56]   Unable to load filterscript 'iTune.amx'.
[
12:16:56]   Loading filterscript 'races.amx'...
[
12:16:56]  
[
12:16:56]  
[
12:16:56]  
[
12:16:56]  ======================================= 
[
12:16:56]  |                                     | 
[
12:16:56]  |        YSI version 3.09.0684        
[
12:16:56]  |        By Alex "******" Cole        
[
12:16:56]  |                                     | 
[
12:16:56]  ======================================= 
[
12:16:56]  
[
12:16:56]  
[
12:16:56]  
[
12:16:56] ==========================================

[
12:16:56]     Filterscript Races system loaded.

[
12:16:56]          Version:  1.0


[12:16:56]   (c2015 JuanS"Juan Ugalde".

[
12:16:56] ==========================================

[
12:16:56]   Loaded 2 filterscripts.

[
12:16:58Houses0
[12:16:58Bussines0
[12:16:58SBiz0
[12:16:58Stuff Loaded
[12:16:58Charity Loaded
[12:16:58Turf0
[12:16:58Papers0
[12:16:58Dynamic Factions0
[12:16:58Cars0
[12:16:58Stock Loaded
[12:16:58656 Objects.
[
12:16:5828 Pickups.
[
12:16:58OnGameModeInit Loaded
[12:16:58Script loaded GameLifework v1.4
[12:16:58Number of vehicle models66
[12:16:58]  
[
12:16:58]  ========================================== 
[
12:16:58]  |                                        | 
[
12:16:58]  |  new version (v3.09.0684of YSI is  
[
12:16:58]  |            available from:             | 
[
12:16:58]  |                                        | 
[
12:16:58]  |     www.y-less.com/YSI/YSI_1.0.zip     
[
12:16:58]  |                                        | 
[
12:16:58]  | Changelog:                             | 
[
12:16:58]  |                                        | 
[
12:16:58]  |   3.00.0000:                           | 
[
12:16:58]  |                                        | 
[
12:16:58]  |   YSI 3.0 released!  Now includes the  
[
12:16:58]  | "y_text" library for better messages,  | 
[
12:16:58]  | and a reworked "y_classes" library.    | 
[
12:16:58]  | Largely documented here                
[
12:16:58]  | "http://forum.sa-mp.com/showthread.php | 
[12:16:58]  | ?t=321092"
.                            | 
[
12:16:58]  |                                        | 
[
12:16:58]  |   3.01.0002:                           | 
[
12:16:58]  |                                        | 
[
12:16:58]  |   Small fixes to "y_text" and          | 
[
12:16:58]  | "y_classes".                           | 
[
12:16:58]  |                                        | 
[
12:16:58]  |   3.09.0684:                           | 
[
12:16:58]  |                                        | 
[
12:16:58]  |   Reverted to old download location.   | 
[
12:16:58]  | Improved (and fixedversion checks;   | 
[
12:16:58]  | added y_bitmapy_areasy_races,      | 
[
12:16:58]  | y_zonenamesbetter documentation;     | 
[
12:16:58]  | MANY other bug fixes see the github  
[
12:16:58]  | repository for more details:           | 
[
12:16:58]  |                                        | 
[
12:16:58]  ========================================== 
[
12:16:58]  
[
12:17:01] --- Server Shutting Down.
[
12:17:01

[
12:17:01]  ===============================

[
12:17:01]      sscanf plugin unloaded.    

[
12:17:01]  ===============================

[
12:17:01

*** 
Streamer Plugin v2.7.5.2 by Incognito unloaded ***

[
12:17:01plugin.mysqlUnloading plugin...
[
12:17:01plugin.mysqlPlugin unloaded
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)