SA-MP Forums Archive
[AJUDA] Meter skins em /serviзo - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] Meter skins em /serviзo (/showthread.php?tid=221312)



[AJUDA] Meter skins em /serviзo - [Dk]TuReTOo - 05.02.2011

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


Re: [AJUDA] Meter skins em /serviзo - Strong_ADM - 05.02.2011

Usa GetPlayerSkin


Re: [AJUDA] Meter skins em /serviзo - [Dk]TuReTOo - 05.02.2011

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


Re: [AJUDA] Meter skins em /serviзo - Strong_ADM - 05.02.2011

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


Re: [AJUDA] Meter skins em /serviзo - Strong_ADM - 05.02.2011

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



Re: [AJUDA] Meter skins em /serviзo - [Dk]TuReTOo - 05.02.2011

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"




Re: [AJUDA] Meter skins em /serviзo - [Dk]TuReTOo - 05.02.2011

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)


Re: [AJUDA] Meter skins em /serviзo - Strong_ADM - 05.02.2011

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


Re: [AJUDA] Meter skins em /serviзo - [Dk]TuReTOo - 05.02.2011

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


Re: [AJUDA] Meter skins em /serviзo - Strong_ADM - 05.02.2011

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.