[Bug] Crash server samp hard
#1

Server crashed while executing NGRP_dfu.amx
[24/03/2014 20:46:16] [debug] AMX backtrace:
[24/03/2014 20:46:16] [debug] #0 native SendClientMessage () [004703a0] from samp-server.exe
[24/03/2014 20:46:16] [debug] #1 004b5600 in public OnPlayerPressButton () from NGRP_dfu.amx
[24/03/2014 20:46:16] [debug] System backtrace:

Help me for my mini server
Reply
#2

Haha, nice script XD, er. have you compiled it?, without errors?
Reply
#3

yes dont have errors , can you help me
Reply
#4

SendClientMessage can crash the server if you use a placeholder in the text. An example that would crash:
pawn Код:
SendClientMessage(playerid, -1, "[SERVER]: %s has teleported.");
Post OnPlayerPressButton function.
Reply
#5

Quote:
Originally Posted by CallumDaBest
Посмотреть сообщение
Haha, nice script XD, er. have you compiled it?, without errors?
Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
SendClientMessage can crash the server if you use a placeholder in the text. An example that would crash:
pawn Код:
SendClientMessage(playerid, -1, "[SERVER]: %s has teleported.");
Post OnPlayerPressButton function.
I need your help ,please give me your fb account or yahoo and teamviewer fix this , i will appreaciate a lot
Reply
#6

here sir

Quote:

public OnPlayerPressButton(playerid, buttonid)
{
if(buttonid == FBILobbyLeftBTN[0] || buttonid == FBILobbyLeftBTN[1])
{
if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
MoveDynamicObject(FBILobbyLeft,293.93002319,-1498.43457031,-46.13965225,4);
SetTimer("CloseFBILobbyLeft", 2500, 0);
}
else
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
}
if(buttonid == FBILobbyRightBTN[0] || buttonid == FBILobbyRightBTN[1])
{
if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
MoveDynamicObject(FBILobbyRight,303.84756470,-1521.62988281,-46.13965225,4);
SetTimer("CloseFBILobbyRight", 2500, 0);
}
else
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
}
if(buttonid == FBIPrivateBTN[0] || buttonid == FBIPrivateBTN[1])
{
if((PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) && PlayerInfo[playerid][pRank] >= 5)
{
MoveDynamicObject(FBIPrivate[0],299.29986572,-1491.75842285,-28.73300552,4);
MoveDynamicObject(FBIPrivate[1],299.33737183,-1496.86145020,-28.73300552,4);
SetTimer("CloseFBIPrivate", 2500, 0);
}
else
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
}
if(buttonid == SANewsStudio)
{
if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9 || IsACop(playerid))
{
MoveDynamicObject(SANewsStudioA,625.60937500,-9.80000019,1106.96081543,4);
MoveDynamicObject(SANewsStudioB,625.64941406,-14.77000046,1106.96081543,4);
SetTimer("CloseSANewsStudio", 2500, 0);
}
else
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
}
if(buttonid == SANewsPrivate)
{
if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9 || IsACop(playerid))
{
MoveDynamicObject(SANewsPrivateA,625.60937500,0.55 000001,1106.96081543,4);
MoveDynamicObject(SANewsPrivateB,625.65002441,-4.54999995,1106.96081543,4);
SetTimer("CloseSANewsPrivate", 2500, 0);
}
else
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
}
if(buttonid == SANewsPrivateOPP)
{
if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9 || IsACop(playerid))
{
MoveDynamicObject(SANewsPrivateA,625.60937500,0.55 000001,1106.96081543,4);
MoveDynamicObject(SANewsPrivateB,625.65002441,-4.54999995,1106.96081543,4);
SetTimer("CloseSANewsPrivate", 2500, 0);
}
else
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
}
if(buttonid == SANewsOffice)
{
if(((PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) && (PlayerInfo[playerid][pRank] >=5 || PlayerInfo[playerid][pDivision] == 4) ) || IsACop(playerid))
{
MoveDynamicObject(SANewsOfficeA,613.66998291,17.82 812500,1106.98425293,4);
MoveDynamicObject(SANewsOfficeB,618.69000244,17.86 899948,1106.98425293,4);
SetTimer("CloseSANewsOffice", 2500, 0);
}
else
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
}
if(buttonid == sasdbtn1)
{
if((PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7) && PlayerInfo[playerid][pRank] >= 5)
{
MoveDynamicObject(sasd1A,2510.65332031,-1697.00976562,561.79223633,4);
MoveDynamicObject(sasd1B,2515.67211914,-1696.97485352,561.79223633,4);
SetTimer("CloseSASD1", 2500, 0);
}
else
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
}
if(buttonid == sasdbtn2)
{
if((PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7) && PlayerInfo[playerid][pRank] >= 3)
{
MoveDynamicObject(sasd5A,2523.86059570,-1660.07177734,561.80206299,4);
MoveDynamicObject(sasd5B,2518.84228516,-1660.10888672,561.80004883,4);
//2522.86059570,-1660.07177734,561.80206299
//2519.84228516,-1660.10888672,561.80004883
SetTimer("CloseSASD5", 2500, 0);
}
else
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
}
if(buttonid == sasdbtn3)
{
if((PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7) && PlayerInfo[playerid][pRank] >= 5)
{
MoveDynamicObject(sasd3A,2521.15600586,-1697.01550293,561.79223633,4);
MoveDynamicObject(sasd3B,2526.15893555,-1696.98010254,561.79223633,4);
SetTimer("CloseSASD3", 2500, 0);
}
else
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
}
if(buttonid == sasdbtn4)
{
if( (PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7) && PlayerInfo[playerid][pRank] >= 5)
{
MoveDynamicObject(sasd2A,2515.87548828,-1697.01525879,561.79223633,4);
MoveDynamicObject(sasd2B,2520.89257812,-1696.97509766,561.79223633,4);
SetTimer("CloseSASD2", 2500, 0);
}
else
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
}
if(buttonid == sasdbtn5)
{
if((PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7) && PlayerInfo[playerid][pRank] >= 3)
{
MoveDynamicObject(sasd4A,2510.84130859,-1660.08081055,561.79528809,4);
MoveDynamicObject(sasd4B,2515.81982422,-1660.04650879,561.80004883,4);
SetTimer("CloseSASD4", 2500, 0);
}
else
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
}
if(buttonid == nooseenter[0] || buttonid == nooseenter[1])
{
if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
{
MoveDynamicObject(entrancedoor,-766.27539062,2536.58691406,10023,2);
SetTimer("CloseEntranceDoor", 5000,0);
}
else
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
}
if(buttonid == radarroom[0] || buttonid == radarroom[1])
{
if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
{
MoveDynamicObject(blastdoor[1],-746.02636719,2535.19433594,10025,2);
SetTimer("CloseBlastDoor2", 5000, 0);
}
else
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
}
if(buttonid == intergate[0] || buttonid == intergate[1])
{
if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
{
MoveDynamicObject(blastdoor[2],-765.26171875,2552.31347656,10025,2);
SetTimer("CloseBlastDoor3", 5000, 0);
}
else
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
}
if(buttonid == intergate[2])
{
if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
{
MoveDynamicObject(cage,-773.52050781,2545.62109375,10025,2);
SetTimer("CloseCage", 5000, 0);
}
else
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
}
if(buttonid == ncontrolroom[0] || buttonid == ncontrolroom[1])
{
if(PlayerInfo[playerid][pMember] == 13 && PlayerInfo[playerid][pRank] >= 5)
{
if(ncontrolroomopened == 1)
{
MoveDynamicObject(ncontrolroomobjects[0],-760.61718750,2544.21679688,10024.92480469,2);
MoveDynamicObject(ncontrolroomobjects[1],-759.52246094,2560.88574219,10024.79785156,2);
MoveDynamicObject(ncontrolroomobjects[2],-755.53906250,2538.61035156,10025.02636719,2);
ncontrolroomopened = 0;
}
else if(ncontrolroomopened == 0)
{
MoveDynamicObject(ncontrolroomobjects[0],-760.61718750,2544.21679688,10020.92480469,2);
MoveDynamicObject(ncontrolroomobjects[1],-759.52246094,2560.88574219,10020.79785156,2);
MoveDynamicObject(ncontrolroomobjects[2],-755.53906250,2538.61035156,10021.02636719,2);
ncontrolroomopened = 1;
}
}
else
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
}
if(buttonid == bottomroom[0] || buttonid == bottomroom[1])
{
if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
{
MoveDynamicObject(blastdoor[0],-764.11816406,2568.81445312,10025.05566406,2);
SetTimer("CloseBlastDoor", 5000, 0);
}
else
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
}
if(buttonid == courtbuttons[0])
{
if(PlayerInfo[playerid][pLeader] != 3 && PlayerInfo[playerid][pMember] != 3 && PlayerInfo[playerid][pLeader] != 5 && PlayerInfo[playerid][pMember] != 5)
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
MoveDynamicObject(courtgates[1],2138.00292969,1290.96386719-10,7698.24169922,4);
SetTimer("CloseCourtGate2", 5000, 0);
}
if(buttonid == courtbuttons[3])
{
if(PlayerInfo[playerid][pLeader] != 3 && PlayerInfo[playerid][pMember] != 3 && PlayerInfo[playerid][pLeader] != 5 && PlayerInfo[playerid][pMember] != 5)
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
MoveDynamicObject(courtgates[1],2138.00292969,1290.96386719-10,7698.24169922,4);
SetTimer("CloseCourtGate2", 5000, 0);
}
if(buttonid == courtbuttons[1])
{
if(PlayerInfo[playerid][pLeader] != 3 && PlayerInfo[playerid][pMember] != 3 && PlayerInfo[playerid][pLeader] != 5 && PlayerInfo[playerid][pMember] != 5)
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
MoveDynamicObject(courtgates[0],2138.00000000,1316.72106934+10,7698.23632812,4);
SetTimer("CloseCourtGate1", 5000, 0);
}
if(buttonid == courtbuttons[2])
{
if(PlayerInfo[playerid][pLeader] != 3 && PlayerInfo[playerid][pMember] != 3 && PlayerInfo[playerid][pLeader] != 5 && PlayerInfo[playerid][pMember] != 5)
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
MoveDynamicObject(courtgates[0],2138.00000000,1316.72106934+10,7698.23632812,4);
SetTimer("CloseCourtGate1", 5000, 0);
}
if(buttonid == westout)
{
if(!IsACop(playerid))
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
MoveDynamicObject(westlobby1,239.71582031,115.0917 9688,1002.21502686,4);
MoveDynamicObject(westlobby2,239.67968750,120.0996 0938,1002.21502686,4);
SetTimer("CloseWestLobby", 2500, 0);
}
if(buttonid == eastout)
{
if(!IsACop(playerid))
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
MoveDynamicObject(eastlobby1,253.14941406,111.5996 0938,1002.21502686,4);
MoveDynamicObject(eastlobby2,253.18457031,106.5996 0938,1002.21502686,4);
SetTimer("CloseEastLobby", 2500, 0);
}
if(buttonid == lockerin || buttonid == lockerout)
{
if(!IsACop(playerid))
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
MoveDynamicObject(locker1,268.29980469,112.5664062 5,1003.61718750,4);
MoveDynamicObject(locker2,263.29980469,112.5292968 8,1003.61718750,4);
SetTimer("CloseLocker", 2500, 0);
}
if(buttonid == cctvin || buttonid == cctvout)
{
if(!IsACop(playerid))
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
MoveDynamicObject(cctv1,263.44921875,115.79980469, 1003.61718750,4);
MoveDynamicObject(cctv2,268.46875000,115.83691406, 1003.61718750,4);
SetTimer("CloseCCTV", 2500, 0);
}
if(buttonid == chiefin || buttonid == chiefout)
{
if((PlayerInfo[playerid][pRank] < 6 && PlayerInfo[playerid][pMember] == 1) || PlayerInfo[playerid][pMember] != 1)
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
MoveDynamicObject(chief1,228.0,119.50000000,1009.2 1875000,4);
MoveDynamicObject(chief2,230.0,119.53515625,1009.2 1875000,4);
SetTimer("CloseChief", 2500, 0);
}
if(buttonid == elevator)
{
if(!IsACop(playerid))
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
else ShowPlayerDialog( playerid, ELEVATOR3, DIALOG_STYLE_LIST, "Elevator", "Rooftop\nGarage", "Select", "Cancel");
}
if(buttonid == garagekey)
{
if(!IsACop(playerid))
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
else ShowPlayerDialog( playerid, ELEVATOR2, DIALOG_STYLE_LIST, "Elevator", "Rooftop\nInterior", "Select", "Cancel");
}
if(buttonid == roofkey)
{
if(!IsACop(playerid))
{
SendClientMessageEx(playerid,COLOR_GREY,"Access denied.");
return 1;
}
else ShowPlayerDialog( playerid, ELEVATOR, DIALOG_STYLE_LIST, "Elevator", "Interior\nGarage", "Select", "Cancel");
}
if(buttonid == westin)
{
MoveDynamicObject(westlobby1,239.71582031,115.0917 9688,1002.21502686,4);
MoveDynamicObject(westlobby2,239.67968750,120.0996 0938,1002.21502686,4);
SetTimer("CloseWestLobby", 2500, 0);
}
if(buttonid == eastin)
{
MoveDynamicObject(eastlobby1,253.14941406,111.5996 0938,1002.21502686,4);
MoveDynamicObject(eastlobby2,253.18457031,106.5996 0938,1002.21502686,4);
SetTimer("CloseEastLobby", 2500, 0);
}
if (buttonid == ngeveryone)
{
if (NGCellStatus == 0)
{
MoveDynamicObject(NGGate1, -292.82714844,1872.89453125,30.15856934, 4.5000);
NGCellStatus=1;
}
else
{
MoveDynamicObject(NGGate1, -292.82714844,1872.89453125,25.90857315, 4.5000);
NGCellStatus=0;
}
}
if (buttonid == PrisonButtons[0] || buttonid == PrisonButtons[3] || buttonid == PrisonButtons[5] || buttonid == PrisonButtons[6] || buttonid == PrisonButtons[7])
{
if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pMember] == 11)
{
ShowPlayerDialog(playerid, PANEL, DIALOG_STYLE_LIST, "Easter Basin Correctional Facility Controls", "Prison Controls\r\nLockdown All\r\nClear Lockdown\r\nDistress Beacon", "Select", "Cancel");
}
else return SendClientMessageEx(playerid, COLOR_GREY, "Ban khong phai lauthorized to use the control panel.");
}
if(buttonid == PrisonButtons[1])
{
if(IsACop(playerid))
{
MoveDynamicObject(BlastDoors[0],-2093.0048828125, -203.93110656738, 1994.6691894531, 1);
SetTimer("ClosePrisonDoor", 3000, 0);
}
else return SendClientMessageEx(playerid, COLOR_GREY, "Ban khong phai lauthorized to use this control panel.");
}
if(buttonid == PrisonButtons[2])
{
if(IsACop(playerid))
{
MoveDynamicObject(BlastDoors[1], -2088.7998046875, -211.2998046875, 1996.7062988281, 1);
MoveDynamicObject(BlastDoors[6], -2088.76562500,-209.21093750,998.66918945, 1);
SetTimer("ClosePrisonDoor2", 3000, 0);
}
else return SendClientMessageEx(playerid, COLOR_GREY, "Ban khong phai lauthorized to use this control panel.");
}
if(buttonid == PrisonButtons[4]) //
{
if(IsACop(playerid))
{
MoveDynamicObject(BlastDoors[11], -2050.50097656,-205.82617188,987.02539062, 1);
SetTimer("ClosePrisonDoor3", 3000, 0);
}
else return SendClientMessageEx(playerid, COLOR_GREY, "Ban khong phai lauthorized to use this control panel.");
}
if(buttonid == PrisonButtons[8]) //
{
if(IsACop(playerid))
{
MoveDynamicObject(BlastDoors[16], -2057.9, -143.4, 987.24, 1);
SetTimer("ClosePrisonDoor4", 3000, 0);
}
else return SendClientMessageEx(playerid, COLOR_GREY, "Ban khong phai lauthorized to use this control panel.");
}
if (buttonid == SFPDButton[0] || buttonid == SFPDButton[3])
{
if(IsACop(playerid))
{
MoveDynamicObject(SFPDObject[0], -1636.02539062, 700.0, 19994.54101562, 2.5);
SetTimer("SFPD", 3000, 0);
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "Access denied.");
}
}

if (buttonid == SFPDButton[1] || buttonid == SFPDButton[2])
{
if(IsACop(playerid))
{
MoveDynamicObject(SFPDObject[1], -1635.99414062,698,19994.55078125, 2.5);
SetTimer("SFPD1", 3000, 0);
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "Access denied.");
}
}

if (buttonid == SFPDButton[4] || buttonid == SFPDButton[5])
{
if(IsACop(playerid))
{
MoveDynamicObject(SFPDObject[2], -1623.8,712.56250000,19994.85937500, 2.5);
SetTimer("SFPD2", 3000, 0);
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "Access denied.");
}
}

if (buttonid == SFPDButton[6] || buttonid == SFPDButton[7])
{
if(IsACop(playerid))
{
MoveDynamicObject(SFPDObject[3], -1613.92871094,679.6,19989.05468750, 2.5);
SetTimer("SFPD3", 3000, 0);
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "Access denied.");
}
}

if (buttonid == SFPDButton[8] || buttonid == SFPDButton[9])
{
if(IsACop(playerid))
{
MoveDynamicObject(SFPDObject[4], -1636.0,712.56250000,19994.85937500, 2.5);
SetTimer("SFPD4", 3000, 0);
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "Access denied.");
}
}
if(buttonid == laytien )
{
if(IsACop(playerid))
{
MoveDynamicObject(khoasat,364.0144, 113.5448, 1014.5800,4);
SetTimer("CloseKhoaSat", 25000, 0);
SendClientMessageEx(playerid,COLOR_GREY,"Ban la nguoi cua chinh phu, nen viec mo? khoa' khong can nhap pass .");
return 1;
}
else
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsACop(i))
{
LEOOnline += 1;
}
}
if(PlayerInfo[playerid][pLevel] < 3)
{
SendClientMessage(playerid, COLOR_GREY, "Ban can level 4 de cuop nha bank!");
return 1;
}
if(LEOOnline <= 1)
{
SendClientMessage(playerid, COLOR_GREY, "Can phai co tren 1 canh sat online!");
return 1;
}
if(RobStatus[BankReload] >= 1)
{
SendClientMessage(playerid, COLOR_GREY, "Ai do da cuop nha bank!");
return 1;
}
if(RobStatus[BeingRobbed] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "Ai do dang cuop bank!");
return 1;
}
if(IsACop(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "Ban dang lam viec nha nuoc,ban khong the cuop bank!");
return 1;
}
if(RobStatus[Setup] == 0)
{
new weap2 = GetPlayerWeapon(playerid);
if(weap2 > 24 && weap2 != 36)
{
new masocua;
masocua = random(10000);
new szKey[6];
new result;

if (GetPVarInt(playerid, "firsttime") != 0)
{
masocua = GetPVarInt(playerid, "masocua");
valstr(szKey, masocua);
result = ShowPlayerKeypad(playerid, 1, szKey);
SetPVarInt(playerid, "masocua", masocua);
}
else
{
valstr(szKey, masocua);
result = ShowPlayerKeypad(playerid, 1, szKey);
SetPVarInt(playerid, "masocua", masocua);
SetPVarInt(playerid, "firsttime", 1);
}
if(result == CREATEKEYPAD_RETURN_INVALID_ID) return SendClientMessage(playerid, COLOR_RED, "Invalid keypad ID passed to CreateKeypad().");
if(result == CREATEKEYPAD_RETURN_NUM) return SendClientMessage(playerid, COLOR_RED, "Invalid keypad string (non-numerical) passed to CreateKeypad().");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "San Fierro Hospital da bao cao ve so rang %s la 1 nguoi dang bi truy na nguy hiem hon de cuop bank!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Ai do da thuc hien 1 vu cuop nha bank!");
return 1;
}
}

}
return 1;
}
return false;
}

public OnPlayerKeypadInput(playerid, keypadID, type, key) // 'key' contains the number that has already been entered in it's entirety
{
if(keypadID == 1 && type == KEYPAD_INPUT_GOOD)
{
MoveDynamicObject(khoasat,364.0144, 113.5448, 1014.5800,4);
// SetTimer("CloseKhoaSat", 25000, 0);
new str[128];
GameTextForPlayer(playerid, "~G~ Chinh xac, lay tien thoi", 3000, 3);
format(str, sizeof(str), "** %s da mo? khoa thanh cong, hay mau dat. boom de pha' ket sat", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, str, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
failed_attempts = 0; // Reset failed attempts
DeletePVar(playerid, "masocua");
DeletePVar(playerid, "firsttime");
RobStatus[Setup] = 1;
playertextid1 = Create3DTextLabel("Hay mau den day dat bomb :\nGo~ /plantc4", 0x008080FF, 360.6530, 110.1944, 1014.3591, 40.0, 0, 0);

}
else if(keypadID == 1 && type == KEYPAD_INPUT_BAD)
{
new string[128];
format(string, sizeof(string),"Ma so mo cua la %d Ma so nhap vao la : %d.", GetPVarInt(playerid, "masocua"), key);
//SendClientMessageEx(playerid, COLOR_GRAD2, string);
format(string, sizeof(string), "%s dang co gang mo? khoa' kho chua' tien` tai. ngan hang Los Angeles", GetPlayerNameEx(playerid));
foreach(new i: Player)
{
if(IsACop(i))
{
SendClientMessageEx(i, TEAM_BLUE_COLOR, string);
}
}
if(key > GetPVarInt(playerid, "masocua"))
{
GameTextForPlayer(playerid, "~R~Ma so' be' hon", 3000, 3);
}
else
{
GameTextForPlayer(playerid, "~R~Ma so' lon' hon", 3000, 3);
}
failed_attempts++;

if(failed_attempts == 3)
{
RobStatus[RobberID1] = playerid;

Reply
#7

Here it is:
pawn Код:
SendClientMessage(playerid, COLOR_GREY, "San Fierro Hospital da bao cao ve so rang %s la 1 nguoi dang bi truy na nguy hiem hon de cuop bank!");
Use format if you want to pass a string as argument.
Reply
#8

How sir , help me fix it your code
Reply
#9

Remove %s if you don't want anything to be shown there.
Reply
#10

@MR avi Raj : thanks thatsall my samp server wont have crash ? isnt it ,sir
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)