Help PLEASE!
#1

hello i have a problem i cannot seem to get the person to spawn with guns
my code is

i am sorry if i posted this in the wrong place...

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == 1)
	{
        if(listitem == 0)
        {
        SetPlayerSkin(playerid, 112);
        SetPlayerPos(playerid,1918.3838,-2255.6760,13.5469);
        GivePlayerWeapon(playerid,352,500);
        GivePlayerWeapon(playerid,355,500);
        GivePlayerWeapon(playerid,358,500);
	}
	if(listitem == 1)
	{
	SetPlayerSkin(playerid, 1);
	SetPlayerPos(playerid,1989.7607,-2604.9336,18.6034);
        GivePlayerWeapon(playerid,352,500);
        GivePlayerWeapon(playerid,355,500);
        GivePlayerWeapon(playerid,358,500);
	}
	if(listitem == 2)
	{
	Kick(playerid);
	}
	}
	return 1;
}
that code is the only code i could get to compile if i did
Код:
........
        if(listitem == 2)
	{
	Kick(playerid);
	}
	}
        }
        }
	return 1;
}
it came up with errors about closing braces

thanks in advance, Jaydon
Reply
#2

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

    if(dialogid == 1)
    {
        if(response)
        {
            if(listitem == 0)
            {
                SetPlayerSkin(playerid, 112);
                SetPlayerPos(playerid,1918.3838,-2255.6760,13.5469);
                GivePlayerWeapon(playerid,352,500);
                GivePlayerWeapon(playerid,355,500);
                GivePlayerWeapon(playerid,358,500);
            }
            if(listitem == 1)
            {
                SetPlayerSkin(playerid, 1);
                SetPlayerPos(playerid,1989.7607,-2604.9336,18.6034);
                GivePlayerWeapon(playerid,352,500);
                GivePlayerWeapon(playerid,355,500);
                GivePlayerWeapon(playerid,358,500);
            }
            if(listitem == 2)
            {
                Kick(playerid);
            }

        }
        return 1;
    }
    return 1;
}
Reply
#3

thanks for your quick reply i will see if it works and egt back to you

thanks

EDIT: nope still getting error messages
Код:
(294) : error 029: invalid expression, assumed zero
(294) : error 004: function "OnPlayerClickPlayer" is not implemented
(298) : error 030: compound statement not closed at the end of file (started at line 266)

And those errors seem to be on

public OnPlayerClickPlayer(playerid, clickedplayerid, source) // will probally because of a missing brace '}'

and also 298 the end of the script
When i put in a '}' before return 1;
i get...
Код:
(292) : warning 217: loose indentation
witch happens to be on the Return 1; line

Thanks for your help i hope you can get back to me
Reply
#4

Quote:
Originally Posted by jaydon
Посмотреть сообщение
thanks for your quick reply i will see if it works and egt back to you
Код:
(292) : warning 217: loose indentation
Put it under INC's:
pawn Код:
#pragma tabsize 0
Reply
#5

Thanks a million, compileing now
BUT still no guns...

EDIT: Please someone help me

EDIT:i think i may have solved it i was using the model number not the ID number from
https://sampwiki.blast.hk/wiki/Weapons

EDIT: yes it worked Thanks for your help
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)