/buy Cellphone
#1

Well i have this command which brings up a dialog when you do /buy, When i choose the Cellphone it restarts the server now for some reason since i got a new host. I have a NGRP edit's command for /buy

pawn Код:
if(dialogid == STOREMENU)
    {
        if(response)
        {
            if(listitem == 0)
            {
                if (GetPlayerCash(playerid) >= 500)
                {
                    new randphone = 1000 + random(9999);//minimum 1000  max 9999
                    ReplacePH(PlayerInfo[playerid][pPnumber], randphone);
                    PlayerInfo[playerid][pPnumber] = randphone;
                    format(string, sizeof(string), "Cellphone purchased, your new phone number is %d.", randphone);
                    SendClientMessageEx(playerid, COLOR_GRAD4, string);
                    SendClientMessageEx(playerid, COLOR_GRAD5, "You can check this any time you wish by typing /stats.");
                    SendClientMessageEx(playerid, COLOR_WHITE, "HINT: You can now type /cellphonehelp to see your cellphone commands.");
                    if(PlayerInfo[playerid][pDonateRank] >= 1)
                    {
                        GivePlayerCash(playerid, -400);
                        SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have received 20 percent off this product. Instead of paying $500, you paid $400.");
                    }
                    else
                    {
                        GivePlayerCash(playerid, -500);
                    }
                }
                else
                {
                    SendClientMessageEx(playerid, COLOR_GRAD4, "You don't have the cash for this item!");
                }
            }
Reply
#2

Most likely your SAMP-Sever.exe is crashing. Go ahead take look at server.log.txt.
Reply
#3

Quote:
Originally Posted by DavidLuango
Посмотреть сообщение
Most likely your SAMP-Sever.exe is crashing. Go ahead take look at server.log.txt.
Nothing is showing up on the logs, It just stops working then i have to launch the server up again.
Reply
#4

Outdated plugins maybe? I don't really see what's wrong in the code.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)