Jump to content
  • 0

problema /skin


horke1

Question

am o problema la skin imi da eror are careva ide va rog

	if (strcmp(cmd, "/skin", true) == 0 )
	{
		new skin[256];
		skin = strtok(cmdtext, idx);

		if (!strlen(skin))
		{
			SendClientMessage(playerid, COLOR_RED, "Use: /skin [skinid]");
			return 1;
		}
		new newskin = strval(skin);
		if ((newskin < 0) || (newskin > 299) || IsInvalidSkin(newskin)) {
			SendClientMessage(playerid, COLOR_RED, "Server: This skin does not exist!");
			return 1;
		}

		if (GetPlayerMoney(playerid) >= 0)
		{
			SetPlayerSkin(playerid, newskin);
			GivePlayerMoney(playerid,-0);
			format(string, 128, "Server: Skin changed to the id %d, have fun", newskin);
			SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		}
		else
		{
			SendClientMessage(playerid, COLOR_RED, "You can not change skin");
		}
		return 1;
	}
eroi astea
D:\server 0.3x\gamemodes\bare.pwn(308) : error 017: undefined symbol "IsInvalidSkin"
D:\server 0.3x\gamemodes\bare.pwn(317) : error 017: undefined symbol "string"
D:\server 0.3x\gamemodes\bare.pwn(318) : error 017: undefined symbol "string"
D:\server 0.3x\gamemodes\bare.pwn(6052) : warning 203: symbol is never used: "iSpawnSet"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Ai macar un stock care apeleaza la IsInvalidSkin ? sau l-ai definit macar ? :-j

Nici nu la definit:

D:\server 0.3x\gamemodes\bare.pwn(308) : error 017: undefined symbol "IsInvalidSkin"
D:\server 0.3x\gamemodes\bare.pwn(317) : error 017: undefined symbol "string"
D:\server 0.3x\gamemodes\bare.pwn(318) : error 017: undefined symbol "string"

Definestel horke1

Rareori ne gândim la ceea ce avem, dar mereu la ceea ce ne lipseşte

Link to comment
Share on other sites

pune asta [pawn]IsValidSkin(skinid)

{

    #define    MAX_BAD_SKINS 9

    new badSkins[MAX_BAD_SKINS] =

    {

        74, 265, 266, 267,

        268, 269, 270, 271, 272

    };

    if (skinid < 0 || skinid > 299) return false;

    for (new i = 0; i < MAX_BAD_SKINS; i++)

    {

        if (skinid == badSkins) return false;

    }

    #undef MAX_BAD_SKINS

    return 1;

}[/pawn]

la sfarsitul GM-ului. si [pawn]new string[256];[/pawn] la inceputul comenzii

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.