PDA

View Full Version : Help


JakeHunter1
20/05/2014, 01:37 PM
I am trying to made a police enqipment and allways getting error on ondialogresponse can somone made ondialogresponse for me ?
CMD:duty(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 326.9761,307.0905,999.1484))
{
ShowPlayerDialog(playerid, DIALOG_DUTY, DIALOG_STYLE_LIST, "PoliceDepartment Enqimpent", "Weapons\nUniformes", "Kupi", "Izlezi");
}

else SendClientMessage(playerid, 0x46E850FF, "Ne ste na mestoto kade sto se zima oprema.!");

return 1;
}

Okey i want on weapons dialog with 9mm , deagle , rifle , shotgun , sniper..
on uniformes i want a dialog the first need to be Uniform 1 , Unifor 2 , Unifor 3 , Unifor 4 , uniform 5
on uniform 1 the skin change in 280 , 2 - 281 , 3 - 282 , 4 - 283 and 5 -285

Rittik
20/05/2014, 01:39 PM
What error do you face while compiling ?

JakeHunter1
20/05/2014, 01:52 PM
What error do you face while compiling ?

a lot of errors :S i don't now to script alot in zcmd i've started scriptin in zcmd 2days ago :S

AndySedeyn
20/05/2014, 01:58 PM
You are missing some brackets.


CMD:duty(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 326.9761,307.0905,999.1484))
{
ShowPlayerDialog(playerid, DIALOG_DUTY, DIALOG_STYLE_LIST, "PoliceDepartment Enqimpent", "Weapons\nUniformes", "Kupi", "Izlezi");
}
else
{
SendClientMessage(playerid, 0x46E850FF, "Ne ste na mestoto kade sto se zima oprema.!");
}
return 1;
}


Requesting scripts shouldn't be done in this section.

JakeHunter1
20/05/2014, 02:01 PM
You are missing some brackets.


CMD:duty(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 326.9761,307.0905,999.1484))
{
ShowPlayerDialog(playerid, DIALOG_DUTY, DIALOG_STYLE_LIST, "PoliceDepartment Enqimpent", "Weapons\nUniformes", "Kupi", "Izlezi");
}
else
{
SendClientMessage(playerid, 0x46E850FF, "Ne ste na mestoto kade sto se zima oprema.!");
}
return 1;
}


Requesting scripts shouldn't be done in this section.

Where to request ?

doreto
20/05/2014, 02:29 PM
Where to request ?

http://forum.sa-mp.com/showthread.php?t=447813

JakeHunter1
20/05/2014, 02:30 PM
http://forum.sa-mp.com/showthread.php?t=447813

All are closed

JakeHunter1
22/05/2014, 12:56 PM
bump !

iFiras
22/05/2014, 01:02 PM
Just post your errors.

JakeHunter1
22/05/2014, 01:08 PM
Just post your errors.

i want somone to do it for me i delete the last 13123 trys :S

rappy93
22/05/2014, 01:10 PM
You are missing some brackets.


CMD:duty(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 326.9761,307.0905,999.1484))
{
ShowPlayerDialog(playerid, DIALOG_DUTY, DIALOG_STYLE_LIST, "PoliceDepartment Enqimpent", "Weapons\nUniformes", "Kupi", "Izlezi");
}
else
{
SendClientMessage(playerid, 0x46E850FF, "Ne ste na mestoto kade sto se zima oprema.!");
}
return 1;
}


Requesting scripts shouldn't be done in this section.

Did you try this ?

AndySedeyn
22/05/2014, 01:14 PM
He's not encountering errors or problems.
He's simply asking someone to make him the script.

As I said, requesting scripts shouldn't be done in this section.
If you really want to try making the script yourself and get some knowledge, here's an example:
http://forum.sa-mp.com/showthread.php?t=320714

JakeHunter1
22/05/2014, 01:47 PM
He's not encountering errors or problems.
He's simply asking someone to make him the script.

As I said, requesting scripts shouldn't be done in this section.
If you really want to try making the script yourself and get some knowledge, here's an example:
http://forum.sa-mp.com/showthread.php?t=320714

now my pawno can't coplite the gmode :S
http://pastebin.com/yvNjrZYm
the bug is somwere ondialogresponse :S

AndySedeyn
22/05/2014, 01:49 PM
It's an old script and yes, it has some bugs. It's an example for you.
It gives you a view on how your script should look like.

JakeHunter1
22/05/2014, 01:51 PM
It's an old script and yes, it has some bugs. It's an example for you.
It gives you a view on how your script should look like.

can you fix it ? +REP .. :S

AndySedeyn
22/05/2014, 01:52 PM
can you fix it ? +REP .. :S

It works for me. Do you get errors?

JakeHunter1
22/05/2014, 02:21 PM
It works for me. Do you get errors?

this script http://pastebin.com/yvNjrZYm

AndySedeyn
22/05/2014, 02:22 PM
You're closing OnDialogResponse at line 619 while there are other dialogs after that.

EDIT:
http://pastebin.com/1c4XUhsj

Replace this code with the whole OnDialogResponse callback from your script.

JakeHunter1
22/05/2014, 02:30 PM
You're closing OnDialogResponse at line 619 while there are other dialogs after that.

EDIT:
http://pastebin.com/1c4XUhsj

Replace this code with the whole OnDialogResponse callback from your script.

http://prntscr.com/3lj5nh Same :S

AndySedeyn
22/05/2014, 02:32 PM
Did the compiler work before adding that script I gave you?

JakeHunter1
22/05/2014, 02:35 PM
Did the compiler work before adding that script I gave you?

no i didn't ...

AndySedeyn
22/05/2014, 02:37 PM
Is that Gamemode downloaded? If yes, did you edit lines yourself?

Comment out lines you edited / added recently and look for small mistakes like placing a bracket instead of a comma. (Using an example from my experience).

JakeHunter1
22/05/2014, 02:44 PM
Is that Gamemode downloaded? If yes, did you edit lines yourself?

Comment out lines you edited / added recently and look for small mistakes like placing a bracket instead of a comma. (Using an example from my experience).

I download'ed the gamemode it don't have error's before i added the system you gave me ..

AndySedeyn
22/05/2014, 02:45 PM
That was my previous question, I'll go through it. Hold on.

EDIT:
Replace this OnDialogResponse Callback with yours.

http://pastebin.com/1c4XUhsj

JakeHunter1
22/05/2014, 03:34 PM
That was my previous question, I'll go through it. Hold on.

EDIT:
Replace this OnDialogResponse Callback with yours.

http://pastebin.com/1c4XUhsj

C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(213) : error 017: undefined symbol "ReloadLabels"
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(214) : error 017: undefined symbol "LoadVehicles"
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(297) : error 017: undefined symbol "UserPath"
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(299) : error 017: undefined symbol "UserPath"
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(305) : error 017: undefined symbol "PreloadAnimLib"
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(306) : error 017: undefined symbol "PreloadAnimLib"
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(325) : error 017: undefined symbol "UserPath"
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(435) : error 017: undefined symbol "RegisterFix"
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(454) : error 017: undefined symbol "SendNearbyMessage"
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(466) : error 002: only a single statement (or expression) can follow each "case"
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(466) : error 029: invalid expression, assumed zero
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(467) : warning 217: loose indentation
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(468) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(468) : warning 219: local variable "pname" shadows a variable at a preceding level
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(469) : warning 217: loose indentation
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(471) : warning 217: loose indentation
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(504) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(514) : error 079: inconsistent return types (array & non-array)
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(543) : error 079: inconsistent return types (array & non-array)
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(582) : error 079: inconsistent return types (array & non-array)
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(611) : error 079: inconsistent return types (array & non-array)
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(641) : error 079: inconsistent return types (array & non-array)
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(645) : error 079: inconsistent return types (array & non-array)
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(649) : error 079: inconsistent return types (array & non-array)
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(651) : error 017: undefined symbol "UserPath"
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(653) : warning 217: loose indentation
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(655) : warning 217: loose indentation
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(657) : error 017: undefined symbol "udb_hash"
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(658) : warning 217: loose indentation
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(665) : warning 217: loose indentation
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(668) : warning 217: loose indentation
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(670) : warning 217: loose indentation
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(676) : warning 217: loose indentation
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(700) : warning 217: loose indentation
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(703) : warning 217: loose indentation
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(707) : warning 217: loose indentation
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(709) : warning 217: loose indentation
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(713) : warning 217: loose indentation
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(718) : error 079: inconsistent return types (array & non-array)
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(722) : error 017: undefined symbol "udb_hash"
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(724) : error 017: undefined symbol "UserPath"
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(726) : warning 217: loose indentation
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(732) : warning 217: loose indentation
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(737) : error 079: inconsistent return types (array & non-array)
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(772) : error 079: inconsistent return types (array & non-array)
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(773) : warning 217: loose indentation
C:\Users\IVAN\Downloads\samp03z_svr_R1_win32\gamem odes\core.pwn(776) : error 017: undefined symbol "CreatePlayerVehicle"

:S

AndySedeyn
22/05/2014, 03:40 PM
I noticed the same loose indentations in your "already"-existing dialogs.

EDIT:
Show me your whole OnDialogResponse callback. You probably made a mistake.

Show it here, not in pastebin.

JakeHunter1
22/05/2014, 04:03 PM
I noticed the same loose indentations in your "already"-existing dialogs.

EDIT:
Show me your whole OnDialogResponse callback. You probably made a mistake.
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new string[128], pname[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, pname, sizeof(pname));

switch(dialogid)
{
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new string[128], pname[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, pname, sizeof(pname));

switch(dialogid)
{
case DIALOG_EQUIPMENT:
{
if(response)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, DIALOG_PISTOLS, DIALOG_STYLE_LIST, "Equipment - Pistols", "Colt. 45 \nColt. 45 w/Silencer \nDesert Eagle \nBack", "Select", "Exit");
}
case 1:
{
ShowPlayerDialog(playerid, DIALOG_HEAVYWEPS, DIALOG_STYLE_LIST, "Equipment - Heavy weapons", "M4 Carbine \nShotgun \nRifle \nSniper \nMP5 \nBack", "Select", "Exit");
}
case 2:
{
ShowPlayerDialog(playerid, DIALOG_MELEE, DIALOG_STYLE_LIST, "Equipment - Melee", "Nitestick \nPepper-Spray \nTear Gas \nBack", "Select", "Exit");
}
case 3:
{
ShowPlayerDialog(playerid, DIALOG_CLOTHING, DIALOG_STYLE_LIST, "Equipment - Clothing", "Cadet \nPolice Uniform \nSWAT Uniform \nBack", "Select", "Exit");
}
case 4:
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, 0x4169FFAA, "[INFO]:{AD9797}You have eaten some donuts, your feeling quite bloated");
ShowPlayerDialog(playerid, DIALOG_EQUIPMENT, DIALOG_STYLE_LIST, "Welcome to the Equipment Selection by {58AB54}Blunt", "Pistols \nHeavy weapons \nMelee weapons \nDonuts \nGo on duty", "Select", "Exit");
}
case 5:
{
SetPlayerColor(playerid, 0x4169FFAA);
new string[256], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"Police Officer: {FFFFFF}%s is now on duty, listen out for his sirens",pName);
SendClientMessageToAll(0x4169FFAA,string);
GetPlayerName(playerid, pName,MAX_PLAYER_NAME);
SendClientMessage(playerid, 0x4169FFAA, string);
format(string, sizeof string, "**%s quickly grabs his badge and equipment before tapping the duty button**");
}
}
}
return 1;
}
case DIALOG_PISTOLS:
{
if(response)
{
switch(listitem)
{
case 0:
{
GivePlayerWeapon(playerid, 22, 250);
ShowPlayerDialog(playerid, DIALOG_PISTOLS, DIALOG_STYLE_LIST, "Equipment - Pistols", "Colt. 45 \nColt. 45 w/Silencer \nDesert Eagle \nBack", "Select", "Exit");
}
case 1:
{
GivePlayerWeapon(playerid, 23, 250);
ShowPlayerDialog(playerid, DIALOG_PISTOLS, DIALOG_STYLE_LIST, "Equipment - Pistols", "Colt. 45 \nColt. 45 w/Silencer \nDesert Eagle \nBack", "Select", "Exit");
}
case 2:
{
GivePlayerWeapon(playerid, 24, 250);
ShowPlayerDialog(playerid, DIALOG_PISTOLS, DIALOG_STYLE_LIST, "Equipment - Pistols", "Colt. 45 \nColt. 45 w/Silencer \nDesert Eagle \nBack", "Select", "Exit");
}
case 3:
{
ShowPlayerDialog(playerid, DIALOG_EQUIPMENT, DIALOG_STYLE_LIST, "Welcome to the Equipment Selection by {58AB54}Blunt", "Pistols \nHeavy weapons \nMelee weapons \nEquipment Suits(Skins) \nDonuts \nGo on duty", "Select", "Exit");
}
}
}
return 1;
}
case DIALOG_HEAVYWEPS:
{
if(response)
{
switch(listitem)
{
case 0:
{
GivePlayerWeapon(playerid, 31, 400);
ShowPlayerDialog(playerid, DIALOG_HEAVYWEPS, DIALOG_STYLE_LIST, "Equipment - Heavy weapons", "M4 Carbine \nShotgun \nRifle \nSniper \nMP5 \nBack", "Select", "Exit");
}
case 1:
{
GivePlayerWeapon(playerid, 25, 200);
ShowPlayerDialog(playerid, DIALOG_HEAVYWEPS, DIALOG_STYLE_LIST, "Equipment - Heavy weapons", "M4 Carbine \nShotgun \nRifle \nSniper \nMP5 \nBack", "Select", "Exit");
}
case 2:
{
GivePlayerWeapon(playerid, 33, 100);
ShowPlayerDialog(playerid, DIALOG_HEAVYWEPS, DIALOG_STYLE_LIST, "Equipment - Heavy weapons", "M4 Carbine \nShotgun \nRifle \nSniper \nMP5 \nBack", "Select", "Exit");
}
case 3:
{
GivePlayerWeapon(playerid, 34, 50);
ShowPlayerDialog(playerid, DIALOG_HEAVYWEPS, DIALOG_STYLE_LIST, "Equipment - Heavy weapons", "M4 Carbine \nShotgun \nRifle \nSniper \nMP5 \nBack", "Select", "Exit");
}
case 4:
{
GivePlayerWeapon(playerid, 29, 500);
ShowPlayerDialog(playerid, DIALOG_HEAVYWEPS, DIALOG_STYLE_LIST, "Equipment - Heavy weapons", "M4 Carbine \nShotgun \nRifle \nSniper \nMP5 \nBack", "Select", "Exit");
}
case 5:
{
ShowPlayerDialog(playerid, DIALOG_EQUIPMENT, DIALOG_STYLE_LIST, "Welcome to the Equipment Selection by {58AB54}Blunt", "Pistols \nHeavy weapons \nMelee weapons \nEquipment Suits(Skins) \nDonuts \nGo on duty", "Select", "Exit");
}
}
}
return 1;
}
case DIALOG_MELEE:
{
if(response)
{
switch(listitem)
{
case 0:
{
GivePlayerWeapon(playerid, 3, 1);
ShowPlayerDialog(playerid, DIALOG_MELEE, DIALOG_STYLE_LIST, "Equipment - Melee", "Nitestick \nPepper-Spray \nTear Gas \nBack", "Select", "Exit");
}
case 1:
{
GivePlayerWeapon(playerid, 41, 9999);
ShowPlayerDialog(playerid, DIALOG_MELEE, DIALOG_STYLE_LIST, "Equipment - Melee", "Nitestick \nPepper-Spray \nTear Gas \nBack", "Select", "Exit");
}
case 2:
{
GivePlayerWeapon(playerid, 17, 5);
ShowPlayerDialog(playerid, DIALOG_MELEE, DIALOG_STYLE_LIST, "Equipment - Melee", "Nitestick \nPepper-Spray \nTear Gas \nBack", "Select", "Exit");
}
case 3:
{
ShowPlayerDialog(playerid, DIALOG_EQUIPMENT, DIALOG_STYLE_LIST, "Welcome to the Equipment Selection by {58AB54}Blunt", "Pistols \nHeavy weapons \nMelee weapons \nEquipment Suits(Skins) \nDonuts \nGo on duty", "Select", "Exit");
}
}
}
return 1;
}

case DIALOG_CLOTHING:
{
if(response)
{
switch(listitem)
{
case 0:
{
SetPlayerSkin(playerid, 71);
ShowPlayerDialog(playerid, DIALOG_CLOTHING, DIALOG_STYLE_LIST, "Equipment - Clothing", "Cadet \nPolice Uniform \nSWAT Uniform \nBack", "Select", "Exit");
}
case 1:
{
SetPlayerSkin(playerid, 280);
ShowPlayerDialog(playerid, DIALOG_CLOTHING, DIALOG_STYLE_LIST, "Equipment - Clothing", "Cadet \nPolice Uniform \nSWAT Uniform \nBack", "Select", "Exit");
}
case 2:
{
SetPlayerSkin(playerid, 287);
ShowPlayerDialog(playerid, DIALOG_CLOTHING, DIALOG_STYLE_LIST, "Equipment - Clothing", "Cadet \nPolice Uniform \nSWAT Uniform \nBack", "Select", "Exit");
}
case 3:
{
ShowPlayerDialog(playerid, DIALOG_EQUIPMENT, DIALOG_STYLE_LIST, "Welcome to the Equipment Selection by {58AB54}Blunt", "Pistols \nHeavy weapons \nMelee weapons \nEquipment Suits(Skins) \nDonuts \nGo on duty", "Select", "Exit");
}
}
}
return 1;
}
case DIALOG_REGISTER:
{
if (!response) return Kick(playerid);

if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", "Napisete password za da se registrirate.", "Register", "Quit");

new INI:File = INI_Open(UserPath(playerid));

new rand1 = random(99999), rand2 = random(99999);

INI_SetTag(File, "Player Data");

INI_WriteInt(File, "Password", udb_hash(inputtext));
INI_WriteInt(File, "Admin", 0);
INI_WriteInt(File, "Level", 1);
INI_WriteInt(File, "Skin", 0);
INI_WriteInt(File, "Exp", 0);
INI_WriteInt(File, "Gender", 0);
INI_WriteInt(File, "Registered", 0);

INI_WriteFloat(File, "Armour", 0);
INI_WriteFloat(File, "Health", 100);

INI_WriteInt(File, "Faction", 0);
INI_WriteInt(File, "FactionTier", 0);
INI_WriteString(File, "FactionRank", "None");

INI_WriteInt(File, "HandMoney", 10000);
INI_WriteInt(File, "BankMoney", 0);

INI_WriteInt(File, "Mask", 0);
INI_WriteInt(File, "MaskID", rand1);
INI_WriteInt(File, "PhoneNumber", rand2);
INI_WriteInt(File, "HouseOwner", 9999);
INI_WriteInt(File, "VehicleOwner", 9999);
INI_WriteInt(File, "BizOwner", 9999);

INI_WriteInt(File, "Weapon1", 0);
INI_WriteInt(File, "Wep1Ammo", 0);
INI_WriteInt(File, "Weapon2", 0);
INI_WriteInt(File, "Wep2Ammo", 0);
INI_WriteInt(File, "Weapon3", 0);
INI_WriteInt(File, "Wep3Ammo", 0);
INI_WriteInt(File, "Weapon4", 0);
INI_WriteInt(File, "Wep4Ammo", 0);
INI_WriteInt(File, "Weapon5", 0);
INI_WriteInt(File, "Wep5Ammo", 0);

INI_WriteInt(File, "lvDay", 0);
INI_WriteInt(File, "lvMonth", 0);
INI_WriteInt(File, "lvYear", 0);
INI_WriteInt(File, "lvHour", 0);
INI_WriteInt(File, "lvMinute", 0);
INI_WriteInt(File, "lvSecond", 0);

INI_WriteInt(File, "LastPos", 0);
INI_WriteInt(File, "LastVW", 0);
INI_WriteInt(File, "LastInt", 0);
INI_WriteFloat(File, "LastX", 0);
INI_WriteFloat(File, "LastY", 0);
INI_WriteFloat(File, "LastZ", 0);

INI_Close(File);

format(string, sizeof(string), "SERVER:{FFFFFF} Dobredojdovte na serverot.., %s!", pname);
SendClientMessage(playerid, 0x46E850FF, string);

SetSpawnInfo(playerid, 0, 0, 0.00, 0.00, 0.00, 0.00, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
}
case DIALOG_LOGIN:
{
if (!response) return Kick(playerid);

if(response)
{
if(udb_hash(inputtext) == pInfo[playerid][Pass])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);

format(string, sizeof(string), "SERVER:{FFFFFF} Dobredojdovte nazad, %s! Posleden pat se najavivte %d/%d/%d %d:%d:%d.", pname, pInfo[playerid][lvDay], pInfo[playerid][lvMonth], pInfo[playerid][lvYear], pInfo[playerid][lvHour], pInfo[playerid][lvMinute], pInfo[playerid][lvSecond]);
SendClientMessage(playerid, 0x46E850FF, string);

Logged[playerid] = true;

SetSpawnInfo(playerid, 0, 0, 0.00, 0.00, 0.00, 0.00, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}

else ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "{FFFFFF}Vnesovte {C44B4B}netocen{FFFFFF} password.\nNapisete go vasiot password za da se logirate.", "Login", "Quit");

return 1;
}
}

case DIALOG_GENDER:
{
if(response)
{
switch(listitem)
{
case 0:
{
pInfo[playerid][Gender] = 1;
SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Go namestivte vasiot pol vo masko.");
SetPlayerSkin(playerid, 291);
}

case 1:
{
pInfo[playerid][Gender] = 2;
SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Go namestivte vasiot pol vo zensko.");
SetPlayerSkin(playerid, 233);
}
}
}
}

case DIALOG_CARBUY:
{
if(response)
{
switch(listitem)
{
case 0: // sabre
{
if(GetPlayerMoney(playerid) < 30000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -30000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} You have purchased a Sabre! Make sure to register it!");
CreatePlayerVehicle(playerid, 542);
}

case 1: // Clover
{
if(GetPlayerMoney(playerid) < 30000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -30000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} You have purchased a Clover! Make sure to register it!");
CreatePlayerVehicle(playerid, 575);
}

case 2: // Broadway
{
if(GetPlayerMoney(playerid) < 30000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -30000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} You have purchased a Broadway! Make sure to register it!");
CreatePlayerVehicle(playerid, 518);
}

case 3: // Buccaneer
{
if(GetPlayerMoney(playerid) < 30000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -30000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} You have purchased a Buccaneer! Make sure to register it!");
CreatePlayerVehicle(playerid, 475);
}

case 4: // Slamvan
{
if(GetPlayerMoney(playerid) < 45000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -45000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} You have purchased a Buccaneer! Make sure to register it!");
CreatePlayerVehicle(playerid, 475);
}

case 5: // Blade
{
if(GetPlayerMoney(playerid) < 45000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -45000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} You have purchased a Blader! Make sure to register it!");
CreatePlayerVehicle(playerid, 436);
}

case 6: // Vincent
{
if(GetPlayerMoney(playerid) < 45000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF}Nemate dovolno pari!");
GivePlayerMoney(playerid, -45000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} You have purchased a Vincent! Make sure to register it!");
CreatePlayerVehicle(playerid, 540);
}

case 7: // Elegant
{
if(GetPlayerMoney(playerid) < 45000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF}Nemate dovolno pari!");
GivePlayerMoney(playerid, -45000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} You have purchased a Elegant! Make sure to register it!");
CreatePlayerVehicle(playerid, 507);
}

case 8: // Intruder
{
if(GetPlayerMoney(playerid) < 45000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -45000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} You have purchased a Intruder! Make sure to register it!");
CreatePlayerVehicle(playerid, 546);
}

case 9: // Primo
{
if(GetPlayerMoney(playerid) < 45000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -45000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} You have purchased a Primo! Make sure to register it!");
CreatePlayerVehicle(playerid, 547);
}

case 10: // Merit
{
if(GetPlayerMoney(playerid) < 45000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -45000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} You have purchased a Merit! Make sure to register it!");
CreatePlayerVehicle(playerid, 551);
}

case 11: // Emperor
{
if(GetPlayerMoney(playerid) < 45000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -45000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} You have purchased a Emperor! Make sure to register it!");
CreatePlayerVehicle(playerid, 585);
}

case 12: // Sentinel
{
if(GetPlayerMoney(playerid) < 45000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -45000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF}Kupivte Sentinel!");
CreatePlayerVehicle(playerid, 405);
}

case 13: // Voodoo
{
if(GetPlayerMoney(playerid) < 45000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -45000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Voodoo!");
CreatePlayerVehicle(playerid, 412);
}

case 14: // Blistac
{
if(GetPlayerMoney(playerid) < 45000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -45000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Blistac!");
CreatePlayerVehicle(playerid, 496);
}

case 15: // Solair
{
if(GetPlayerMoney(playerid) < 45000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF}Nemate dovolno pari!");
GivePlayerMoney(playerid, -45000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Solair!");
CreatePlayerVehicle(playerid, 458);
}

case 16: // Perenail
{
if(GetPlayerMoney(playerid) < 45000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -45000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Perenail!");
CreatePlayerVehicle(playerid, 404);
}

case 17: // Club
{
if(GetPlayerMoney(playerid) < 45000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -45000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Club!");
CreatePlayerVehicle(playerid, 589);
}

case 18: // Washington
{
if(GetPlayerMoney(playerid) < 50000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -50000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Washington!");
CreatePlayerVehicle(playerid, 421);
}

case 19: // Premier
{
if(GetPlayerMoney(playerid) < 50000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -50000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Premier!");
CreatePlayerVehicle(playerid, 426);
}

case 20: // Stafford
{
if(GetPlayerMoney(playerid) < 50000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF}Nemate dovolno pari!");
GivePlayerMoney(playerid, -50000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Stafford!");
CreatePlayerVehicle(playerid, 580);
}

case 21: // Feltzer
{
if(GetPlayerMoney(playerid) < 50000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -50000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Feltzer!");
CreatePlayerVehicle(playerid, 533);
}

case 22: // Savanna
{
if(GetPlayerMoney(playerid) < 50000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF}Nemate dovolno pari!");
GivePlayerMoney(playerid, -50000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Savanna!");
CreatePlayerVehicle(playerid, 567);
}

case 23: // Tornado
{
if(GetPlayerMoney(playerid) < 50000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -50000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Tornado!");
CreatePlayerVehicle(playerid, 576);
}

case 24: // Tahoma
{
if(GetPlayerMoney(playerid) < 50000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -50000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Tahoma!");
CreatePlayerVehicle(playerid, 566);
}

case 25: // Majestic
{
if(GetPlayerMoney(playerid) < 50000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -50000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} YKupivte Majestic!");
CreatePlayerVehicle(playerid, 517);
}

case 26: // Picador
{
if(GetPlayerMoney(playerid) < 50000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF}Nemate dovolno pari!");
GivePlayerMoney(playerid, -50000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Picador !");
CreatePlayerVehicle(playerid, 600);
}

case 27: // Rancher
{
if(GetPlayerMoney(playerid) < 50000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -50000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Rancher!");
CreatePlayerVehicle(playerid, 489);
}

case 28: // Regina
{
if(GetPlayerMoney(playerid) < 60000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -60000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Regina!");
CreatePlayerVehicle(playerid, 479);
}

case 29: // Landstalker
{
if(GetPlayerMoney(playerid) < 60000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -60000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte LandStalker!");
CreatePlayerVehicle(playerid, 400);
}

case 30: // Huntley
{
if(GetPlayerMoney(playerid) < 60000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -60000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Huntley!");
CreatePlayerVehicle(playerid, 579);
}

case 31: // Buffalo
{
if(GetPlayerMoney(playerid) < 75000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -75000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Buffalo!");
CreatePlayerVehicle(playerid, 402);
}

case 32: // Elegy
{
if(GetPlayerMoney(playerid) < 75000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -75000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Elegy!");
CreatePlayerVehicle(playerid, 562);
}

case 33: // Flash
{
if(GetPlayerMoney(playerid) < 75000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -75000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Flash!");
CreatePlayerVehicle(playerid, 565);
}

case 34: // Sultan
{
if(GetPlayerMoney(playerid) < 75000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -75000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Sultan!");
CreatePlayerVehicle(playerid, 560);
}

case 35: // Jester
{
if(GetPlayerMoney(playerid) < 75000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -75000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Jester !!");
CreatePlayerVehicle(playerid, 559);
}

}
}
}
case DIALOG_BIKEBUY:
{
if(response)
{
switch(listitem)
{
case 0: // faggio
{
if(GetPlayerMoney(playerid) < 15000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -15000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF}Kupivte Faggio!");
CreatePlayerVehicle(playerid, 462);
}

case 1: // pcj-600
{
if(GetPlayerMoney(playerid) < 45000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF}Nemate dovolno pari!");
GivePlayerMoney(playerid, -45000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte PSJ 600!");
CreatePlayerVehicle(playerid, 461);
}

case 2: // bf-400
{
if(GetPlayerMoney(playerid) < 45000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -45000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte BF 400!");
CreatePlayerVehicle(playerid, 581);
}

case 3: // fcr-900
{
if(GetPlayerMoney(playerid) < 45000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -45000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte FCR 900!");
CreatePlayerVehicle(playerid, 521);
}

case 4: // sanchez
{
if(GetPlayerMoney(playerid) < 30000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -30000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Sanchez!");
CreatePlayerVehicle(playerid, 486);
}

case 5: // freeway
{
if(GetPlayerMoney(playerid) < 25000) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Nemate dovolno pari!");
GivePlayerMoney(playerid, -75000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Freeway!");
CreatePlayerVehicle(playerid, 463);
}

case 6: // wayfarer
{
if(GetPlayerMoney(playerid) < 25000) return SendClientMessage(playerid, 0x46E850FF, "GRESKA:{FFFFFF}Nemate dovolno pari!");
GivePlayerMoney(playerid, -75000);

SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} Kupivte Wayfarer!");
CreatePlayerVehicle(playerid, 586);
}

}
}
}

case DIALOG_BUY:
{
if(response)
{
switch(listitem)
{
case 0: // Mask: 1250
{
if(GetPlayerMoney(playerid) < 1250) return SendClientMessage(playerid, 0x46E850FF, "GRESKA:{FFFFFF} Nemate dovolno pari za da go kupite ovaj produkt!");

GivePlayerMoney(playerid, -1250);
pInfo[playerid][Mask] = 1; // add one integer
SendClientMessage(playerid, 0x46E850FF, "INFO:{FFFFFF} Kupivte maska!");
}

case 1: // Medikit: 750
{
if(GetPlayerMoney(playerid) < 750) return SendClientMessage(playerid, 0x46E850FF, "GRESKA:{FFFFFF} Nemate dovolno pari za da go kupite ovaj produkt!");

GivePlayerMoney(playerid, -750);
pMedikit[playerid] += 1; // add one integer
SendClientMessage(playerid, 0x46E850FF, "INFO:{FFFFFF} Kupivte brza pomos!");
}
}
}
}

}

return 0;
}

AndySedeyn
22/05/2014, 04:04 PM
Remove this (The one after switch(dialogid)):


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new string[128], pname[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, pname, sizeof(pname));


You have it twice.

JakeHunter1
22/05/2014, 04:06 PM
Remove this (The one after switch(dialogid)):


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new string[128], pname[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, pname, sizeof(pname));


You have it twice.

no errors :D Just warnings i will fix them :D ty bro +REP

AndySedeyn
22/05/2014, 04:07 PM
no errors :D Just warnings i will fix them :D ty bro +REP

Glad I could help. ;)