SA-MP Forums Archive
Smail Help :D +Rep - 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: Smail Help :D +Rep (/showthread.php?tid=558091)



Smail Help :D +Rep - Desha1 - 16.01.2015

Hello Guys
i Have Problems
My Choose With Numbers
its Working Fine But When i /Close i Done Close it i Write numbers i see it Working
What this bug and how to fix it to disable ?
PHP код:
CMD:show(playeridparams[])
{
    
Show(playerid);
    
ShowText[playerid] = 1;
    return 
1;
}
CMD:close(playeridparams[])
{
    
Hide(playerid);
    
ShowText[playerid] = 0;
    return 
1;

PHP код:
    if(text[0] == '1'// if he write 1 in chat
    
{
        if(
ShowSkyText[playerid] == 1// If Textdraws are open.
        
{
          
GivePlayerWeapon(playerid4646);
          
SetPlayerPos(playerid1686.9702,-1312.8329,872.7163);
        }
    }
    if(
text[0] == '2'// if he write 2 in chat
    
{
        if(
ShowSkyText[playerid] == 1)
        {
            
GivePlayerWeapon(playerid4646);
            
SetPlayerPos(playerid, -2112.7942,659.1328,875.6769);
        }
    }
    if(
text[0] == '3'// if he write 1 in chat
    
{
        if(
ShowSkyText[playerid] == 1// If Textdraws are open.
        
{
          
GivePlayerWeapon(playerid4646);
          
SetPlayerPos(playerid2343.6409,1521.8400,732.7235);
        }
    } 
why when i /close > And when i type numbers its work > Why ? how to fix


Re: Smail Help :D +Rep - amirab - 16.01.2015

try to change your cmds like this :
PHP код:
CMD:show(playeridparams[])
{
    
Show(playerid);
    
ShowSkyText[playerid] = 1;
    return 
1;
}
CMD:close(playeridparams[])
{
    
Hide(playerid);
    
ShowSkyText[playerid] = 0;
    return 
1;




Re: Smail Help :D +Rep - Desha1 - 16.01.2015

Quote:
Originally Posted by amirab
Посмотреть сообщение
try to change your cmds like this :
PHP код:
CMD:show(playeridparams[])
{
    
Show(playerid);
    
ShowSkyText[playerid] = 1;
    return 
1;
}
CMD:close(playeridparams[])
{
    
Hide(playerid);
    
ShowSkyText[playerid] = 0;
    return 
1;

what the new i dont see diffrent


Re: Smail Help :D +Rep - BroZeus - 16.01.2015

the diffrence is that you did ShowText[playerid] = 0 and he did ShowSkyText[playerid] = 0;


Re: Smail Help :D +Rep - amirab - 16.01.2015

Quote:
Originally Posted by Desha1
Посмотреть сообщение
what the new i dont see diffrent
as BroZeus said , the deference is in your vars
now see the title