SA-MP Forums Archive
:(help me - 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: :(help me (/showthread.php?tid=574370)



:(help me - XaibBaba - 16.05.2015

Код:
public OnPlayerClickTextDraw(playerid, Text:textid)
{
    if(textid == Wheels[3])
    {
        SetPlayerSkin(playerid, 0);
	}
    else if(textid == Wheels[4])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(textid == Wheels[5])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(textid == Wheels[6])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(textid == Wheels[7])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(textid == Wheels[8])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(textid == Wheels[9])
    {
	    SetPlayerSkin(playerid, 0);
	}
	else if(textid == Wheels[10])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(textid == Wheels[11])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(textid == Wheels[12])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(textid == Wheels[13])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(textid == Wheels[14])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(textid == Wheels[15])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(textid == Wheels[17])
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "You have chosen to Close the Wheels Menu.");
	}
	return 1;
}
Error
Код:
E:\aaa\Marx Gaming\gamemodes\new.pwn(7264) : error 025: function heading differs from prototype



Re: :(help me - [FMJ]PowerSurge - 16.05.2015

Change the first line to:
Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
and change all 'textid' to 'clickedid', or add
Код:
new Text:textid = clickedid;



Re: :(help me - XaibBaba - 16.05.2015

when i did that so this warning is comming and this line isn't in script
Код:
E:\aaa\Marx Gaming\gamemodes\new.pwn(80312) : warning 203: symbol is never used: "textid"



Re : :(help me - StreetRP - 16.05.2015

No do like this :

Код HTML:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == Wheels[3])
    {
        SetPlayerSkin(playerid, 0);
	}
    else if(clickedid == Wheels[4])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(clickedid == Wheels[5])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(clickedid == Wheels[6])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(clickedid == Wheels[7])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(clickedid == Wheels[8])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(clickedid == Wheels[9])
    {
	    SetPlayerSkin(playerid, 0);
	}
	else if(clickedid == Wheels[10])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(clickedid == Wheels[11])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(clickedid == Wheels[12])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(clickedid == Wheels[13])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(clickedid == Wheels[14])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(clickedid == Wheels[15])
    {
		SetPlayerSkin(playerid, 0);
	}
	else if(clickedid == Wheels[17])
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "You have chosen to Close the Wheels Menu.");
	}
	return 1;
}



Re: :(help me - dominik523 - 16.05.2015

Please search next time. If you have problems with your callbacks, try to see the original callback on the wiki:
Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    
    return 1;
}



Re: :(help me - Nirzor - 16.05.2015

Always use the original callback. Thats a lifetime tip I can give you , while you script game-modes.


Re: :(help me - XaibBaba - 16.05.2015

it didn't work guys same warning is comming