[HELP]Locking a skin
#1

Can someone post here a link of tut who shows how to lock skin on some name
Reply
#2

what you mean lock it with password?
Reply
#3

No I want to lock on someone's name like cj skin locks on name DopeDog
Reply
#4

couldn't understand what you said
Reply
#5

pawn Код:
#include <a_samp>

public OnPlayerRequestSpawn(playerid)
{
    if( GetPlayerSkin( playerid ) == CJ SKIN HERE ) // compare the skin you got with the CJ skin
    {
        new pName[24];
        GetPlayerName( playerid, pName, sizeof pName ); // getting player name
       
        if( !strcmp( pName, "Name here", false ) ) // change 'name here' to the name you want to not lock this skin for + comparing your current name with the second name
        {
            return 1; // allow the player to spawn
        }
        else // names doent match
        {
            SendClientMessage( playerid, -1, "Skin is locked. " );
            return 0; // dont let the player spawn
        }
    }
    return 1;
}
Reply
#6

Thanks
Reply
#7

But Errors
Код:
C:\Users\pc\Desktop\Basic RP Script Scratch FIX\gamemodes\ThugLife.pwn(1384) : error 010: invalid function or declaration
C:\Users\pc\Desktop\Basic RP Script Scratch FIX\gamemodes\ThugLife.pwn(1387) : error 021: symbol already defined: "GetPlayerName"
C:\Users\pc\Desktop\Basic RP Script Scratch FIX\gamemodes\ThugLife.pwn(1389) : error 010: invalid function or declaration
C:\Users\pc\Desktop\Basic RP Script Scratch FIX\gamemodes\ThugLife.pwn(1391) : error 010: invalid function or declaration
C:\Users\pc\Desktop\Basic RP Script Scratch FIX\gamemodes\ThugLife.pwn(1393) : error 010: invalid function or declaration
C:\Users\pc\Desktop\Basic RP Script Scratch FIX\gamemodes\ThugLife.pwn(1396) : error 054: unmatched closing brace ("}")
C:\Users\pc\Desktop\Basic RP Script Scratch FIX\gamemodes\ThugLife.pwn(1396 -- 1400) : error 010: invalid function or declaration
C:\Users\pc\Desktop\Basic RP Script Scratch FIX\gamemodes\ThugLife.pwn(1396 -- 1404) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\pc\Desktop\Basic RP Script Scratch FIX\gamemodes\ThugLife.pwn(1470) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\pc\Desktop\Basic RP Script Scratch FIX\gamemodes\ThugLife.pwn(1630) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
C:\Users\pc\Desktop\Basic RP Script Scratch FIX\gamemodes\ThugLife.pwn(2458) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\pc\Desktop\Basic RP Script Scratch FIX\gamemodes\ThugLife.pwn(2476) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\pc\Desktop\Basic RP Script Scratch FIX\gamemodes\ThugLife.pwn(5107) : warning 235: public function lacks forward declaration (symbol "OnPlayerInfoChange")
C:\Users\pc\Desktop\Basic RP Script Scratch FIX\gamemodes\ThugLife.pwn(6379) : warning 203: symbol is never used: "SetPlayerHalth"
C:\Users\pc\Desktop\Basic RP Script Scratch FIX\gamemodes\ThugLife.pwn(900) : warning 204: symbol is assigned a value that is never used: "behbincoenter"
C:\Users\pc\Desktop\Basic RP Script Scratch FIX\gamemodes\ThugLife.pwn(900 -- 6379) : warning 203: symbol is never used: "pName"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.
Reply
#8

Cant be from the piece of code i gave, it compiled just fine.
Reply
#9

Ok I'ma try again
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)