OnPlayerConnect Skin help -
Private200 - 29.07.2012
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
Re: OnPlayerConnect Skin help -
KingyKings - 29.07.2012
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.
Re: OnPlayerConnect Skin help -
Littlehelper - 29.07.2012
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.
Re: OnPlayerConnect Skin help -
Private200 - 29.07.2012
Код:
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 ??
Re: OnPlayerConnect Skin help -
Devilxz97 - 29.07.2012
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;
}
Re: OnPlayerConnect Skin help -
Private200 - 29.07.2012
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
Re: OnPlayerConnect Skin help -
KingyKings - 29.07.2012
Your missing a bracket in your script or a ';'
Re: OnPlayerConnect Skin help -
Littlehelper - 29.07.2012
.....
Change
pawn Код:
if(YourAdminVariable[playerid] >= 1)
to your admin variable...
Re: OnPlayerConnect Skin help -
Devilxz97 - 29.07.2012
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 ?
Re: OnPlayerConnect Skin help -
Private200 - 29.07.2012
whats the admin variable , i mean what you mean with it ?