OnPlayerConnect Skin help
#1

Hi , i want to change skin for admins on player connect , i mean , when a admin minimum lv 1 join server , after he pick the class , he get automatically skin 217 and to get a minigun and granades with 50000 ammo , i got this before , but now i restarted my gm and everything is from the start , and now i forgot how to do it . ANd if it is possible , the admins have pink name and pink color when sending a message
Reply
#2

Its all easily possibly. What admin system do you use.

Whats the scripting code to check if the player is admin in your script?

I can try and help.
Reply
#3

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(YourAdminVariable[playerid] >= 1)
    {
        SetPlayerSkin(playerid,217);
        GivePlayerWeapon(playerid,38,5000);
        GivePlayerWeapon(playeird,16,5000);
    }
return 1;
}
And for pink chat...
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(YourAdminVariable[playerid] >= 1)
    {
        new
        szMsg[128]
        ;
        GetPlayerName(playerid, szMsg, MAX_PLAYER_NAME);
        format(szMsg, sizeof(szMsg), "Administrator %s %s", szMsg, text);
        SendClientMessageToAll(0xFF66FFAA, text);
        return 0;
    }
    return 1;
}
Simple as that.
Reply
#4

Код:
G:\The new server!!!\gamemodes\PPC_Trucking.pwn(873) : warning 217: loose indentation
G:\The new server!!!\gamemodes\PPC_Trucking.pwn(915) : warning 225: unreachable code
G:\The new server!!!\gamemodes\PPC_Trucking.pwn(1169) : error 029: invalid expression, assumed zero
G:\The new server!!!\gamemodes\PPC_Trucking.pwn(1169) : warning 215: expression has no effect
G:\The new server!!!\gamemodes\PPC_Trucking.pwn(1169) : error 001: expected token: ";", but found "]"
G:\The new server!!!\gamemodes\PPC_Trucking.pwn(1169) : error 029: invalid expression, assumed zero
G:\The new server!!!\gamemodes\PPC_Trucking.pwn(1169) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
how can i fix this ??
Reply
#5

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(YourAdminVariable[playerid] >= 1)
    {
        new
        szMsg[128]
        ;
        GetPlayerName(playerid, szMsg, MAX_PLAYER_NAME);
        format(szMsg, sizeof(szMsg), "Administrator %s %s", szMsg, text);
        SendClientMessageToAll(0xFF66FFAA, text);
    }
    return 1;
}
Reply
#6

nothing changed

pawn Код:
G:\The new server!!!\gamemodes\PPC_Trucking.pwn(873) : warning 217: loose indentation
G:\The new server!!!\gamemodes\PPC_Trucking.pwn(915) : warning 225: unreachable code
G:\The new server!!!\gamemodes\PPC_Trucking.pwn(1169) : error 029: invalid expression, assumed zero
G:\The new server!!!\gamemodes\PPC_Trucking.pwn(1169) : warning 215: expression has no effect
G:\The new server!!!\gamemodes\PPC_Trucking.pwn(1169) : error 001: expected token: ";", but found "]"
G:\The new server!!!\gamemodes\PPC_Trucking.pwn(1169) : error 029: invalid expression, assumed zero
G:\The new server!!!\gamemodes\PPC_Trucking.pwn(1169) : fatal error 107: too many error messages on one line

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


4 Errors.
problem is with skin line
Reply
#7

Your missing a bracket in your script or a ';'
Reply
#8

.....
Change
pawn Код:
if(YourAdminVariable[playerid] >= 1)
to your admin variable...
Reply
#9

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(YourAdminVariable[playerid] >= 1)
    {
        new szMsg[128];
        GetPlayerName(playerid, szMsg, MAX_PLAYER_NAME);
        format(szMsg, sizeof(szMsg), "Administrator %s %s", szMsg, text);
        SendClientMessageToAll(0xFF66FFAA, text);
    }
    return 1;
}
this ?
Reply
#10

whats the admin variable , i mean what you mean with it ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)