SA-MP Forums Archive
Whats wrong with this? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Whats wrong with this? (/showthread.php?tid=271300)



Whats wrong with this? - Shockey HD - 23.07.2011

public OnPlayerCommandText(playerid, cmdtext[])
{
COMMANDtunt(playerid,params[])
{
ShowPlayerDialog(playerid,42,DIALOG_STYLE_LIST,"{F F002B}HayZatic Stunt Selection","{F2C80C}Stunt 1 - Cost: $1000\n","GoTo!","Close");
return 1;
}

Код:
C:\Documents and Settings\Chris\Desktop\Desktop\Mastalol\Grand Theft Auto San Andreas Samp Server\gamemodes\FreeRoam.pwn(1389) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Chris\Desktop\Desktop\Mastalol\Grand Theft Auto San Andreas Samp Server\gamemodes\FreeRoam.pwn(1389) : error 017: undefined symbol "cmd_stunt"
C:\Documents and Settings\Chris\Desktop\Desktop\Mastalol\Grand Theft Auto San Andreas Samp Server\gamemodes\FreeRoam.pwn(1389) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Chris\Desktop\Desktop\Mastalol\Grand Theft Auto San Andreas Samp Server\gamemodes\FreeRoam.pwn(1389) : fatal error 107: too many error messages on one line



Re: Whats wrong with this? - MoroDan - 23.07.2011

Don't use this in OnPlayerCommandText ! Actually, you have to remove your OnPlayerCommandText, if you use ZCMD.


Re: Whats wrong with this? - Kush - 23.07.2011

Remove from the OnPlayerCommandText callback, and place at the bottom of your script.

PHP код:
COMMAND:tunt(playerid,params[])
{
    
ShowPlayerDialog(playerid,42,DIALOG_STYLE_LIST,"{F F002B}HayZatic Stunt Selection","{F2C80C}Stunt 1 - Cost: $1000\n","GoTo!","Close");
    return 
1;




Re: Whats wrong with this? - Shockey HD - 23.07.2011

Quote:
Originally Posted by MoroDan
Посмотреть сообщение
Don't use this in OnPlayerCommandText ! Actually, you have to remove your OnPlayerCommandText, if you use ZCMD.
now i got

Код:
C:\Documents and Settings\Chris\Desktop\Desktop\Mastalol\Grand Theft Auto San Andreas Samp Server\gamemodes\FreeRoam.pwn(1516) : error 021: symbol already defined: "SendClientMessage"
C:\Documents and Settings\Chris\Desktop\Desktop\Mastalol\Grand Theft Auto San Andreas Samp Server\gamemodes\FreeRoam.pwn(1518) : error 010: invalid function or declaration
C:\Documents and Settings\Chris\Desktop\Desktop\Mastalol\Grand Theft Auto San Andreas Samp Server\gamemodes\FreeRoam.pwn(1631) : error 010: invalid function or declaration
C:\Documents and Settings\Chris\Desktop\Desktop\Mastalol\Grand Theft Auto San Andreas Samp Server\gamemodes\FreeRoam.pwn(3356) : error 004: function "zcmd_OnPlayerCommandText" is not implemented
C:\Documents and Settings\Chris\Desktop\Desktop\Mastalol\Grand Theft Auto San Andreas Samp Server\gamemodes\FreeRoam.pwn(3361) : error 004: function "zcmd_OnPlayerCommandText" is not implemented
C:\Documents and Settings\Chris\Desktop\Desktop\Mastalol\Grand Theft Auto San Andreas Samp Server\gamemodes\FreeRoam.pwn(3381) : warning 203: symbol is never used: "cmds"



Re: Whats wrong with this? - MoroDan - 23.07.2011

You left one or more SendClientMessage, out of OnPlayerCommandText or somewhere.

Something like this:
PHP код:
public OneFunction(...)
{
    ...
}
stock MyOwnFunction(...)
{
    ...
}
SendClientMessage(___);
public 
ETC(...)
{
    ...




Re: Whats wrong with this? - Cro_Haxor - 23.07.2011

If you use ZCMD.. you need to put it out of all lines..on end of your script..ex

Код:
public OnPlayerCommandText(playerid, cmdtext[];)
{
             //Do SomeThing here!
        return 1;
}
Command:stunt(playerid, params[])
{
ShowPlayerDialog(playerid,42,DIALOG_STYLE_LIST,"{F F002B}HayZatic Stunt Selection","{F2C80C}Stunt 1 - Cost: $1000\n","GoTo!","Close");
return 1;
}
public OnGameModeInit()
{
      SetGameModeText("Stunt..");
      return 1;
}
Do something like that..i didn't put it on end but you see how you need to do it.. i think that works.