SA-MP Forums Archive
SetPlayerSkin error - 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: SetPlayerSkin error (/showthread.php?tid=299534)



SetPlayerSkin error - Gooday - 26.11.2011

Quote:

public OnPlayerText(playerid, text[])
{
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/chief186", true) == 0)
{
// Set the player's skin to ID 277, which is a fireman.
SetPlayerSkin(playerid, 275);
SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Chief.");
return 1;
}
{
if(strcmp(cmdtext, "/dchief1861", true) == 0)
{
// Set the player's skin to ID 277, which is a fireman.
SetPlayerSkin(playerid, 279);
SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Deputy Chief.");
return 1;
}
{
if(strcmp(cmdtext, "/fire1211", true) == 0)
{
// Set the player's skin to ID 277, which is a fireman.
SetPlayerSkin(playerid, 27;
SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Fireman.");
return 1;
}
{
if(strcmp(cmdtext, "/fire1212", true) == 0)
{
// Set the player's skin to ID 277, which is a fireman.
SetPlayerSkin(playerid, 277);
SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Fireman.");
return 1;
}
{
if(strcmp(cmdtext, "/fire1213", true) == 0)
{
// Set the player's skin to ID 277, which is a fireman.
SetPlayerSkin(playerid, 27;
SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Fireman.");
return 1;
}
{
if(strcmp(cmdtext, "/fire1214", true) == 0)
{
// Set the player's skin to ID 277, which is a fireman.
SetPlayerSkin(playerid, 277);
SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Fireman.");
return 1;
}
{
if(strcmp(cmdtext, "/med18612", true) == 0)
{
// Set the player's skin to ID 277, which is a fireman.
SetPlayerSkin(playerid, 274);
SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as Paramedic.");
return 1;
}
{
if(strcmp(cmdtext, "/med18613", true) == 0)
{
// Set the player's skin to ID 277, which is a fireman.
SetPlayerSkin(playerid, 276);
SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as Paramedic");
return 1;
}
{
if(strcmp(cmdtext, "/capt186", true) == 0)
{
// Set the player's skin to ID 277, which is a fireman.
SetPlayerSkin(playerid, 281);
SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Capitan.");
return 1;
}
{
if(strcmp(cmdtext, "/off1861", true) == 0)
{
// Set the player's skin to ID 277, which is a fireman.
SetPlayerSkin(playerid, 283);
SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Officer.");
return 1;
}
{
if(strcmp(cmdtext, "/off1862", true) == 0)
{
// Set the player's skin to ID 277, which is a fireman.
SetPlayerSkin(playerid, 28;
SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Officer.");
return 1;
}
{
if(strcmp(cmdtext, "/off1863", true) == 0)
{
// Set the player's skin to ID 277, which is a fireman.
SetPlayerSkin(playerid, 281);
SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Officer.");
return 1;
}
{
if(strcmp(cmdtext, "/off1864", true) == 0)
{
// Set the player's skin to ID 277, which is a fireman.
SetPlayerSkin(playerid, 28;
SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Officer.");
return 1;
}
{
if(strcmp(cmdtext, "/sher186", true) == 0)
{
// Set the player's skin to ID 277, which is a fireman.
SetPlayerSkin(playerid, 282);
SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Sheriff.");
return 1;
}
{
if(strcmp(cmdtext, "/dsher1861", true) == 0)
{
// Set the player's skin to ID 277, which is a fireman.
SetPlayerSkin(playerid, 283);
SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Deputy Sheriff.");
return 1;
}




return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}

}

PLEASE HELP I GOT ERRORS!


Re: SetPlayerSkin error - MathijsS - 26.11.2011

what errors?


Re: SetPlayerSkin error - Gooday - 26.11.2011

cant upload....


Re: SetPlayerSkin error - Gooday - 26.11.2011

pawn Код:
C:\Documents and Settings\Luca\Desktop\skins.pwn(97) : warning 217: loose indentation
C:\Documents and Settings\Luca\Desktop\skins.pwn(99) : warning 217: loose indentation
C:\Documents and Settings\Luca\Desktop\skins.pwn(107) : warning 217: loose indentation
C:\Documents and Settings\Luca\Desktop\skins.pwn(115) : warning 217: loose indentation
C:\Documents and Settings\Luca\Desktop\skins.pwn(123) : warning 217: loose indentation
C:\Documents and Settings\Luca\Desktop\skins.pwn(131) : warning 217: loose indentation
C:\Documents and Settings\Luca\Desktop\skins.pwn(139) : warning 217: loose indentation
C:\Documents and Settings\Luca\Desktop\skins.pwn(147) : warning 217: loose indentation
C:\Documents and Settings\Luca\Desktop\skins.pwn(155) : warning 217: loose indentation
C:\Documents and Settings\Luca\Desktop\skins.pwn(163) : warning 217: loose indentation
C:\Documents and Settings\Luca\Desktop\skins.pwn(171) : warning 217: loose indentation
C:\Documents and Settings\Luca\Desktop\skins.pwn(179) : warning 217: loose indentation
C:\Documents and Settings\Luca\Desktop\skins.pwn(187) : warning 217: loose indentation
C:\Documents and Settings\Luca\Desktop\skins.pwn(195) : warning 217: loose indentation
C:\Documents and Settings\Luca\Desktop\skins.pwn(203) : warning 217: loose indentation
C:\Documents and Settings\Luca\Desktop\skins.pwn(218) : warning 225: unreachable code
C:\Documents and Settings\Luca\Desktop\skins.pwn(218) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luca\Desktop\skins.pwn(218) : error 004: function "OnPlayerEnterVehicle" is not implemented
C:\Documents and Settings\Luca\Desktop\skins.pwn(223) : warning 225: unreachable code
C:\Documents and Settings\Luca\Desktop\skins.pwn(223) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luca\Desktop\skins.pwn(223) : error 004: function "OnPlayerExitVehicle" is not implemented
C:\Documents and Settings\Luca\Desktop\skins.pwn(228) : warning 225: unreachable code
C:\Documents and Settings\Luca\Desktop\skins.pwn(228) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luca\Desktop\skins.pwn(228) : error 004: function "OnPlayerStateChange" is not implemented
C:\Documents and Settings\Luca\Desktop\skins.pwn(233) : warning 225: unreachable code
C:\Documents and Settings\Luca\Desktop\skins.pwn(233) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luca\Desktop\skins.pwn(233) : error 004: function "OnPlayerEnterCheckpoint" is not implemented
C:\Documents and Settings\Luca\Desktop\skins.pwn(238) : warning 225: unreachable code
C:\Documents and Settings\Luca\Desktop\skins.pwn(238) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luca\Desktop\skins.pwn(238) : error 004: function "OnPlayerLeaveCheckpoint" is not implemented
C:\Documents and Settings\Luca\Desktop\skins.pwn(243) : warning 225: unreachable code
C:\Documents and Settings\Luca\Desktop\skins.pwn(243) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luca\Desktop\skins.pwn(243) : error 004: function "OnPlayerEnterRaceCheckpoint" is not implemented
C:\Documents and Settings\Luca\Desktop\skins.pwn(248) : warning 225: unreachable code
C:\Documents and Settings\Luca\Desktop\skins.pwn(248) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luca\Desktop\skins.pwn(248) : error 004: function "OnPlayerLeaveRaceCheckpoint" is not implemented
C:\Documents and Settings\Luca\Desktop\skins.pwn(253) : warning 225: unreachable code
C:\Documents and Settings\Luca\Desktop\skins.pwn(253) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luca\Desktop\skins.pwn(253) : error 004: function "OnRconCommand" is not implemented
C:\Documents and Settings\Luca\Desktop\skins.pwn(258) : warning 225: unreachable code
C:\Documents and Settings\Luca\Desktop\skins.pwn(258) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luca\Desktop\skins.pwn(258) : error 004: function "OnPlayerRequestSpawn" is not implemented
C:\Documents and Settings\Luca\Desktop\skins.pwn(263) : warning 225: unreachable code
C:\Documents and Settings\Luca\Desktop\skins.pwn(263) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luca\Desktop\skins.pwn(263) : error 004: function "OnObjectMoved" is not implemented
C:\Documents and Settings\Luca\Desktop\skins.pwn(268) : warning 225: unreachable code
C:\Documents and Settings\Luca\Desktop\skins.pwn(268) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luca\Desktop\skins.pwn(268) : error 004: function "OnPlayerObjectMoved" is not implemented
C:\Documents and Settings\Luca\Desktop\skins.pwn(273) : warning 225: unreachable code
C:\Documents and Settings\Luca\Desktop\skins.pwn(273) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luca\Desktop\skins.pwn(273) : error 004: function "OnPlayerPickUpPickup" is not implemented
C:\Documents and Settings\Luca\Desktop\skins.pwn(278) : warning 225: unreachable code
C:\Documents and Settings\Luca\Desktop\skins.pwn(278) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luca\Desktop\skins.pwn(278) : error 004: function "OnVehicleMod" is not implemented

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.



Re: SetPlayerSkin error - Kingunit - 26.11.2011

Included a_samp? And ****** on the loose identation error.


Re: SetPlayerSkin error - marwan - 26.11.2011

write #include <a_samp> in the top of the script and try to compile it again


Re: SetPlayerSkin error - Kingunit - 26.11.2011

If it's already replace your OnPlayerCommandText with mine:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

    if(strcmp(cmdtext, "/chief186", true) == 0)
    {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 275);
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Chief.");
        return 1;
    }
   

    if(strcmp(cmdtext, "/dchief1861", true) == 0)
    {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 279);
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Deputy Chief.");
        return 1;
    }


    if(strcmp(cmdtext, "/fire1211", true) == 0)
    {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 27;
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Fireman.");
        return 1;
    }

    if(strcmp(cmdtext, "/fire1212", true) == 0)
    {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 277);
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Fireman.");
        return 1;
    }

    if(strcmp(cmdtext, "/fire1213", true) == 0)
    {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 27;
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Fireman.");
        return 1;
    }

    if(strcmp(cmdtext, "/fire1214", true) == 0)
    {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 277);
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Fireman.");
        return 1;
    }

    if(strcmp(cmdtext, "/med18612", true) == 0)
    {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 274);
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as Paramedic.");
        return 1;
    }

    if(strcmp(cmdtext, "/med18613", true) == 0)
    {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 276);
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as Paramedic");
        return 1;
    }

    if(strcmp(cmdtext, "/capt186", true) == 0)
    {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 281);
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Capitan.");
        return 1;
    }
   
    if(strcmp(cmdtext, "/off1861", true) == 0)
    {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 283);
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Officer.");
        return 1;

    if(strcmp(cmdtext, "/off1862", true) == 0)
    {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 28;
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Officer.");
        return 1;
    }
   
    if(strcmp(cmdtext, "/off1863", true) == 0)

        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 281);
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Officer.");
        return 1;
    }
   
    if(strcmp(cmdtext, "/off1864", true) == 0)
    {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 28;
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Officer.");
        return 1;
    }
   
    if(strcmp(cmdtext, "/sher186", true) == 0)
    {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 282);
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Sheriff.");
        return 1;
    }
   
    if(strcmp(cmdtext, "/dsher1861", true) == 0)
    {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 283);
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Deputy Sheriff.");
        return 1;
    }
    return 0;
}



Re: SetPlayerSkin error - Kostas' - 26.11.2011

pawn Код:
public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/chief186", true) == 0) {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 275);
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Chief.");
        return 1;
    }
    if(strcmp(cmdtext, "/dchief1861", true) == 0) {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 279);
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Deputy Chief.");
        return 1;
    }
    if(strcmp(cmdtext, "/fire1211", true) == 0) {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 278);
            SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Fireman.");
            return 1;
    }
    if(strcmp(cmdtext, "/fire1212", true) == 0) {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 277);
            SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Fireman.");
            return 1;
    }
    if(strcmp(cmdtext, "/fire1213", true) == 0) {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 278);
            SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Fireman.");
            return 1;
    }
    if(strcmp(cmdtext, "/fire1214", true) == 0) {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 277);
            SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Fireman.");
            return 1;
    }
    if(strcmp(cmdtext, "/med18612", true) == 0) {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 274);
            SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as Paramedic.");
            return 1;
    }
    if(strcmp(cmdtext, "/med18613", true) == 0) {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 276);
            SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as Paramedic");
            return 1;
    }
    if(strcmp(cmdtext, "/capt186", true) == 0) {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 281);
            SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Capitan.");
            return 1;
    }
    if(strcmp(cmdtext, "/off1861", true) == 0) {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 283);
            SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Officer.");
            return 1;
    }
    if(strcmp(cmdtext, "/off1862", true) == 0) {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 288);
            SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Officer.");
            return 1;
    }
    if(strcmp(cmdtext, "/off1863", true) == 0) {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 281);
            SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Officer.");
            return 1;
    }
    if(strcmp(cmdtext, "/off1864", true) == 0) {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 288);
            SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Officer.");
            return 1;
    }
    if(strcmp(cmdtext, "/sher186", true) == 0) {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 282);
            SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Sheriff.");
            return 1;
    }
    if(strcmp(cmdtext, "/dsher1861", true) == 0) {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 283);
            SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCSD Deputy Sheriff.");
            return 1;
    }

    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}



Re: SetPlayerSkin error - Gooday - 26.11.2011

Quote:

C:\Documents and Settings\Luca\Desktop\skins.pwn(115) : error 001: expected token: ",", but found ";"
C:\Documents and Settings\Luca\Desktop\skins.pwn(131) : error 001: expected token: ",", but found ";"
C:\Documents and Settings\Luca\Desktop\skins.pwn(175) : warning 225: unreachable code
C:\Documents and Settings\Luca\Desktop\skins.pwn(175) : warning 217: loose indentation
C:\Documents and Settings\Luca\Desktop\skins.pwn(17 : error 001: expected token: ",", but found ";"
C:\Documents and Settings\Luca\Desktop\skins.pwn(187) : warning 217: loose indentation
C:\Documents and Settings\Luca\Desktop\skins.pwn(194) : error 001: expected token: ",", but found ";"
C:\Documents and Settings\Luca\Desktop\skins.pwn(216) : error 054: unmatched closing brace ("}")
C:\Documents and Settings\Luca\Desktop\skins.pwn(217) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Errors.

Now i got just 6 errors


Re: SetPlayerSkin error - Kingunit - 26.11.2011

Quote:
Originally Posted by Gooday
Посмотреть сообщение
Now i got just 6 errors
Wich code you used.