[AJUDA] Meter skins em /serviзo
#1

Ola Eu tenho uma facзгo de policia no meu RP e ao fazer /serviзo ele fica com a farda de policia mas depois ao sair de serviso fica outra vez com a farda de policia, eu queria fazer /serviso e a parecer a farda e depois ao sair de serviso voltar a skin que o player tinha.. agradeзo
Reply
#2

Usa GetPlayerSkin
Reply
#3

ja me disseram isso mas nao funciona --"

Quote:

if(strcmp(cmd, "/serviзo", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
if (PlayerToPoint(3, playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerInfo[playerid][pLocal] != 255)
{
if(OnDuty[playerid]==0)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "* Oficial %s tirou um distintivo e uma arma do armбrio.", sendername);
}
else if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "* Argente %s tirou um distintivo e uma arma do armбrio.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
SafeGivePlayerWeapon(playerid, 24, 50);
SafeGivePlayerWeapon(playerid, 26, 0);
SetPlayerArmour(playerid, 100);
SetPlayerSkin(playerid, 281)
SetPlayerColor(playerid,0x008EFFFF);
OnDuty[playerid] = 1;
}
else if(OnDuty[playerid]==1)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "* Oficial %s coloca seu distintivo e arma no seu armбrio.", sendername);
}
else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
format(string, sizeof(string), "* Argente %s coloca seu distintivo e arma no seu armбrio.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
SafeResetPlayerWeapons(playerid);
SetPlayerArmour(playerid, 0);
GetPlayerSkin(playerid);
SetPlayerColor(playerid,0x008EFFFF);
OnDuty[playerid] = 0;
}
}
else

nгo deu vez
Reply
#4

Й claro que nгo vai funcionar estб fazendo errado pera aew jб faзo para vc
Reply
#5

pawn Код:
if(strcmp(cmd, "/serviзo", true) == 0)
{
if(IsPlayerConnected(playerid))
{

new Skin;
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
if (PlayerToPoint(3, playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerInfo[playerid][pLocal] != 255)
{
if(OnDuty[playerid]==0)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "* Oficial %s tirou um distintivo e uma arma do armбrio.", sendername);
}
else if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "* Argente %s tirou um distintivo e uma arma do armбrio.", sendername);
}
Skin = GetPlayerSkin(playerid);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
SafeGivePlayerWeapon(playerid, 24, 50);
SafeGivePlayerWeapon(playerid, 26, 0);
SetPlayerArmour(playerid, 100);
SetPlayerSkin(playerid, 281)
SetPlayerColor(playerid,0x008EFFFF);
OnDuty[playerid] = 1;
}
else if(OnDuty[playerid]==1)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "* Oficial %s coloca seu distintivo e arma no seu armбrio.", sendername);
}
else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
format(string, sizeof(string), "* Argente %s coloca seu distintivo e arma no seu armбrio.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
SafeResetPlayerWeapons(playerid);
SetPlayerSkin(playerid, Skin);
SetPlayerArmour(playerid, 0);
SetPlayerColor(playerid,0x008EFFFF);
OnDuty[playerid] = 0;
}
}
else
Reply
#6

da quatro erros


Quote:

C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\gamemodes\RPGTUGA.pwn(1970 : error 017: undefined symbol "Skin"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\gamemodes\RPGTUGA.pwn(19724) : error 017: undefined symbol "Skin"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\gamemodes\RPGTUGA.pwn(19746) : error 017: undefined symbol "Skin"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\gamemodes\RPGTUGA.pwn(19769) : error 017: undefined symbol "Skin"

Reply
#7

Fogo alguem que me ajude com este erro ou me diga outra form, eu so quero que ao fazer /serviзo me meta a skin ke meti ke foi 281 mas kuando fasso pa sair de serviзo fica com a skin 281 mas kero ke fique com a skin do ke a pessoa tem (Ex: SkinID: 59)
Reply
#8

pawn Код:
if(strcmp(cmd, "/serviзo", true) == 0)
{
if(IsPlayerConnected(playerid))
{

new Skin = GetPlayerSkin(playerid);
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
if (PlayerToPoint(3, playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerInfo[playerid][pLocal] != 255)
{
if(OnDuty[playerid]==0)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "* Oficial %s tirou um distintivo e uma arma do armбrio.", sendername);
}
else if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "* Argente %s tirou um distintivo e uma arma do armбrio.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
SafeGivePlayerWeapon(playerid, 24, 50);
SafeGivePlayerWeapon(playerid, 26, 0);
SetPlayerArmour(playerid, 100);
SetPlayerSkin(playerid, 281)
SetPlayerColor(playerid,0x008EFFFF);
OnDuty[playerid] = 1;
}
else if(OnDuty[playerid]==1)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "* Oficial %s coloca seu distintivo e arma no seu armбrio.", sendername);
}
else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
format(string, sizeof(string), "* Argente %s coloca seu distintivo e arma no seu armбrio.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
SafeResetPlayerWeapons(playerid);
SetPlayerSkin(playerid, Skin);
SetPlayerArmour(playerid, 0);
SetPlayerColor(playerid,0x008EFFFF);
OnDuty[playerid] = 0;
}
}
else
tenta aew
Reply
#9

eu meti isso mas depois quando fui a sair de /serviзo fikei com a skin 281 :S eu queria ficar com a skin ke comprei
Reply
#10

pawn Код:
if(strcmp(cmd, "/serviзo", true) == 0)
{
if(IsPlayerConnected(playerid))
{

new Skin = GetPlayerSkin(playerid);
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
if (PlayerToPoint(3, playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerInfo[playerid][pLocal] != 255)
{
if(OnDuty[playerid]==0)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "* Oficial %s tirou um distintivo e uma arma do armбrio.", sendername);
}
else if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "* Argente %s tirou um distintivo e uma arma do armбrio.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
GetPlayerSkin(playerid);
SafeGivePlayerWeapon(playerid, 24, 50);
SafeGivePlayerWeapon(playerid, 26, 0);
SetPlayerArmour(playerid, 100);
SetPlayerSkin(playerid, 281)
SetPlayerColor(playerid,0x008EFFFF);
OnDuty[playerid] = 1;
}
else if(OnDuty[playerid]==1)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "* Oficial %s coloca seu distintivo e arma no seu armбrio.", sendername);
}
else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
format(string, sizeof(string), "* Argente %s coloca seu distintivo e arma no seu armбrio.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
SafeResetPlayerWeapons(playerid);
SetPlayerSkin(playerid, Skin);
SetPlayerArmour(playerid, 0);
SetPlayerColor(playerid,0x008EFFFF);
OnDuty[playerid] = 0;
}
}
else
testa agora.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)