I need help ! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I need help ! (
/showthread.php?tid=576527)
I need help ! -
Sn4ke2 - 04.06.2015
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(playerid, COLOR_LIGHTRED, "You need to login first.");
if(IsAtClothShop(playerid))
{
if(PlayerInfo[playerid][pMember] >= 1 && 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(playerid, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, gInviteSpawns[rand][3]);
SetPlayerCameraPos(playerid,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
SetPlayerCameraLookAt(playerid,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
TogglePlayerControllable(playerid, 0);
SelectChar[playerid] = 255;
SelectCharID[playerid] = PlayerInfo[playerid][pMember];
SelectCharPlace[playerid] = 1;
PlayerInfo[playerid][pChar] = ChosenSkin[playerid];
ShowPlayerDialog(playerid, DIALOG_CLOTHES, DIALOG_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(string, sizeof(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;
}
Re: I need help ! -
SoFahim - 05.06.2015
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
Re: I need help ! -
Sn4ke2 - 05.06.2015
ok i will try and tell you
Re: I need help ! -
JaydenJason - 05.06.2015
There's no ShowPlayerDialog code in there at all.
Re: I need help ! -
J0sh... - 05.06.2015
I think there is.
PHP код:
ShowPlayerDialog(playerid, DIALOG_CLOTHES, DIALOG_STYLE_MSGBOX,"Clothes:", "Press 'Next' to select the clothes.\nPress 'Done' once you have chosen the clothes.","Next", "Done");
Re: I need help ! -
Konstantinos - 05.06.2015
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.
Re: I need help ! -
Sn4ke2 - 05.06.2015
Can you give me an ideea how to change it ?

D
Re: I need help ! -
Sn4ke2 - 06.06.2015
up ?
Re: I need help ! -
Yashas - 06.06.2015
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
Re: I need help ! -
Sn4ke2 - 06.06.2015
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:56] Server Plugins
[12:16:56] --------------
[12:16:56] Loading plugin: sscanf
[12:16:56]
[12:16:56] ===============================
[12:16:56] sscanf plugin loaded.
[12:16:56] Version: 2.8.1
[12:16:56] (c) 2012 Alex "******" Cole
[12:16:56] ===============================
[12:16:56] Loaded.
[12:16:56] Loading plugin: streamer
[12:16:56]
*** Streamer Plugin v2.7.5.2 by Incognito loaded ***
[12:16:56] Loaded.
[12:16:56] Loading plugin: mysql
[12:16:56] >> plugin.mysql: R38 successfully loaded.
[12:16:56] Loaded.
[12:16:56] Loaded 3 plugins.
[12:16:56]
[12:16:56] Filterscripts
[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:56] Attach 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] (c) 2015 JuanS. "Juan Ugalde".
[12:16:56] ==========================================
[12:16:56] Loaded 2 filterscripts.
[12:16:58] Houses: 0
[12:16:58] Bussines: 0
[12:16:58] SBiz: 0
[12:16:58] Stuff Loaded
[12:16:58] Charity Loaded
[12:16:58] Turf: 0
[12:16:58] Papers: 0
[12:16:58] Dynamic Factions: 0
[12:16:58] Cars: 0
[12:16:58] Stock Loaded
[12:16:58] 656 - Objects.
[12:16:58] 28 - Pickups.
[12:16:58] OnGameModeInit Loaded
[12:16:58] Script loaded - GameLifework v1.4
[12:16:58] Number of vehicle models: 66
[12:16:58]
[12:16:58] ==========================================
[12:16:58] | |
[12:16:58] | A new version (v3.09.0684) of 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 fixed) version checks; |
[12:16:58] | added y_bitmap, y_areas, y_races, |
[12:16:58] | y_zonenames, better 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:01] plugin.mysql: Unloading plugin...
[12:17:01] plugin.mysql: Plugin unloaded.