SA-MP Forums Archive
Laptop Problem - 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: Laptop Problem (/showthread.php?tid=381854)



Laptop Problem - Akcent_Voltaj - 01.10.2012

if i have my laptop On when i type /laptop it should appear Laptop: Off if my laptop is on it should appear Laptop: OFF

PHP код:
if(strcmp(cmd"/laptop"true) == 0)
                    {
                            if(
PlayerInfo[playerid][pLaptop] == 1)
                            {
                            new 
otext[20];
                            if(
LaptopInc[playerid] == 0) { otext "On"; }
                            else if(
LaptopInc[playerid] == 1) { otext "OFF"; }
                            
ShowPlayerDialog(playerid,Dialog_Laptop,DIALOG_STYLE_LIST,"Laptop","1    Laptop: %s\n","Selecteaza","Inchide");
                            }
                            else
                            {
                            
SendClientMessage(playeridCOLOR_LIGHTBLUE"Mergi la 24/7 si cumparati un Laptop !");
                        }
                        return 
true;
                    } 
please help +REP!


Re: Laptop Problem - RenSoprano - 01.10.2012

pawn Код:
if(strcmp(cmd, "/laptop", true) == 0)
{
    if(PlayerInfo[playerid][pLaptop] == 1)
    {
        new otext[20];
        if(LaptopInc[playerid] == 1) { otext = "On"; }
        else if(LaptopInc[playerid] == 0) { otext = "OFF"; }
        ShowPlayerDialog(playerid,Dialog_Laptop,DIALOG_STYLE_LIST,"Laptop","1    Laptop: %s\n","Selecteaza","Inchide");
        }
        else
        {
            SendClientMessage(playerid, COLOR_LIGHTBLUE, "Mergi la 24/7 si cumparati un Laptop !");
        }
        return true;
    }
}



Re: Laptop Problem - Akcent_Voltaj - 01.10.2012

Quote:
Originally Posted by RenSoprano
Посмотреть сообщение
pawn Код:
if(strcmp(cmd, "/laptop", true) == 0)
{
    if(PlayerInfo[playerid][pLaptop] == 1)
    {
        new otext[20];
        if(LaptopInc[playerid] == 1) { otext = "On"; }
        else if(LaptopInc[playerid] == 0) { otext = "OFF"; }
        ShowPlayerDialog(playerid,Dialog_Laptop,DIALOG_STYLE_LIST,"Laptop","1    Laptop: %s\n","Selecteaza","Inchide");
        }
        else
        {
            SendClientMessage(playerid, COLOR_LIGHTBLUE, "Mergi la 24/7 si cumparati un Laptop !");
        }
        return true;
    }
}
what you change here??and pawno doesent respond to your cmd..


Re: Laptop Problem - Akcent_Voltaj - 01.10.2012

anyone know??


Re: Laptop Problem - RedJohn - 01.10.2012

pawn Код:
if(strcmp(cmd, "/laptop", true) == 0)
{
    if(PlayerInfo[playerid][pLaptop] == 1)
    {
        new otext[20], string[20];
        if(LaptopInc[playerid] == 0) { otext = "On"; }
        else if(LaptopInc[playerid] == 1) { otext = "OFF"; }
        format(string, sizeof(string), "Laptop: %s\n", otext);
        ShowPlayerDialog(playerid,Dialog_Laptop,DIALOG_STYLE_LIST,"Laptop",string,"Selecteaza","Inchide");
    }
    else
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Mergi la 24/7 si cumparati un Laptop !");
    }
    return true;
}



Re: Laptop Problem - Akcent_Voltaj - 01.10.2012

works bye +REPED = REDJOHN