else
{
SendClientMessage(playerid, ErrorColor, "[PSBR]: Vocк nгo й da Staff.");
}
}
return 1;
}
if(strcmp(cmd,"/darLider",true)==0)
{
new tmp[256];
tmp = strtok(cmdtext,idx);
new id = ReturnUser(tmp);
new tmp2[256];
tmp2 = strtok(cmdtext,idx);
new Liderid = strval(tmp2);
if(PlayerInfo[playerid][Admin] < 4) SendClientMessage(playerid,ErrorColor,"[PSBR]: Vocк nгo й Administrador.");
else if(!strlen(tmp)||Liderid > 16 || Liderid < 0 || !strlen(tmp2)) SendClientMessage(playerid,ErrorColor,"[PSBR]: /darlider [IDPlayer] [LiderID (0(Desempregado)~16)]");
else if(!IsPlayerConnected(id)) SendClientMessage(playerid,ErrorColor,"[PSBR]: Jogador Disconectado.");
else
{
new FilePathInfo[256];
if(Liderid == Mendigo)
{
format(FilePathInfo,sizeof(FilePathInfo),"%sOrg%d.ini",OrgFiles,PlayerInfo[id][Org]);
dini_Set(FilePathInfo,"Lider","Ninguйm");
LoadOrgInfo(PlayerInfo[id][Org]);
}
else
{
format(FilePathInfo,sizeof(FilePathInfo),"%sOrg%d.ini",OrgFiles,Liderid);
dini_Set(FilePathInfo,"Lider",PlayerInfo[id][Name]);
LoadOrgInfo(Liderid);
}
PlayerInfo[id][Org] = Liderid;
PlayerInfo[id][Lider] = Liderid;
PlayerInfo[id][Cargo] = 6;
RemovePlayerFromVehicle(playerid);
if(Liderid == Mendigo) SetPlayerSkin(id,94),PlayerInfo[playerid][Cargo] = 0;
else if(Liderid == PM) SetPlayerSkin(id,PMSkin[0]);
else if(Liderid == PF) SetPlayerSkin(id,PFSkin[0]);
else if(Liderid == GOE) SetPlayerSkin(id,GOESkin[0]);
else if(Liderid == Exercito) SetPlayerSkin(id,ExercitoSkin[0]);
else if(Liderid == FAB) SetPlayerSkin(id,FABSkin[0]);
else if(Liderid == FARC) SetPlayerSkin(id,FARCSkin[0]);
else if(Liderid == AlQaeda) SetPlayerSkin(id,AlQaedaSkin[0]);
else if(Liderid == Governo) SetPlayerSkin(id,GovernoSkin[0]);
else if(Liderid == Assassino) SetPlayerSkin(id,AssassinoSkin[0]);
else if(Liderid == Reporter) SetPlayerSkin(id,ReporterSkin[0]);
else if(Liderid == Yakuza) SetPlayerSkin(id,YakuzaSkin[0]);
else if(Liderid == Mafia) SetPlayerSkin(id,MafiaSkin[0]);
else if(Liderid == GavioesDaFiel) SetPlayerSkin(id,GavioesSkin[0]);
else if(Liderid == ManchaVerde) SetPlayerSkin(id,MVSkin[0]);
else if(Liderid == TorcidaJovemDoGremio) SetPlayerSkin(id,TJGSkin[0]);
else if(Liderid == RacaRubroNegra) SetPlayerSkin(id,RRNSkin[0]);
PlayerInfo[id][Skin] = GetPlayerSkin(id);
new Float:x,Float:y,Float:z;
GetPlayerPos(id,x,y,z);
SetPlayerPos(id,x,y,z);
SendClientMessage(id,BroadCastColor,"[PSBR]: Vocк foi setado como lнder do(a) %s.",Liderid);
SendClientMessage(id,BroadCastColor,"[PSBR]: Vocк setou este player como lнder de uma Org.");
}
return 1;
}
if(strcmp(cmd,"/promover",true)==0)
{
new tmp[256];
tmp = strtok(cmdtext,idx);
if(strcmp(cmd,"/darlider",true)==0)
{
new var[128], id, Liderid;
var = strtok(cmdtext,idx);
if(!strlen(var)) return SendClientMessage(playerid,ErrorColor,"[PSBR]: /darlider [IDPlayer] [LiderID (0(Desempregado)~16)]");
id = ReturnUser(var);
var = strtok(cmdtext,idx);
if(!strlen(var)) return SendClientMessage(playerid,ErrorColor,"[PSBR]: /darlider [IDPlayer] [LiderID (0(Desempregado)~16)]");
Liderid = strval(var);
if(PlayerInfo[playerid][Admin] < 4) return SendClientMessage(playerid,ErrorColor,"[PSBR]: Vocк nгo й Administrador.");
if(Liderid > 16 || Liderid < 0) return SendClientMessage(playerid,ErrorColor,"[PSBR]: /darlider [IDPlayer] [LiderID (0(Desempregado)~16)]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,ErrorColor,"[PSBR]: Jogador Disconectado.");
new FilePathInfo[256];
switch(Liderid)
{
case Mendigo:
{
format(FilePathInfo,sizeof(FilePathInfo),"%sOrg%d.ini",OrgFiles,PlayerInfo[id][Org]);
dini_Set(FilePathInfo,"Lider","Ninguйm");
LoadOrgInfo(PlayerInfo[id][Org]);
}
default:
{
format(FilePathInfo,sizeof(FilePathInfo),"%sOrg%d.ini",OrgFiles,Liderid);
dini_Set(FilePathInfo,"Lider",PlayerInfo[id][Name]);
LoadOrgInfo(Liderid);
}
}
PlayerInfo[id][Org] = Liderid;
PlayerInfo[id][Lider] = Liderid;
PlayerInfo[id][Cargo] = 6;
RemovePlayerFromVehicle(playerid);
if(Liderid == Mendigo) SetPlayerSkin(id,94),PlayerInfo[playerid][Cargo] = 0;
else if(Liderid == PM) SetPlayerSkin(id,PMSkin[0]);
else if(Liderid == PF) SetPlayerSkin(id,PFSkin[0]);
else if(Liderid == GOE) SetPlayerSkin(id,GOESkin[0]);
else if(Liderid == Exercito) SetPlayerSkin(id,ExercitoSkin[0]);
else if(Liderid == FAB) SetPlayerSkin(id,FABSkin[0]);
else if(Liderid == FARC) SetPlayerSkin(id,FARCSkin[0]);
else if(Liderid == AlQaeda) SetPlayerSkin(id,AlQaedaSkin[0]);
else if(Liderid == Governo) SetPlayerSkin(id,GovernoSkin[0]);
else if(Liderid == Assassino) SetPlayerSkin(id,AssassinoSkin[0]);
else if(Liderid == Reporter) SetPlayerSkin(id,ReporterSkin[0]);
else if(Liderid == Yakuza) SetPlayerSkin(id,YakuzaSkin[0]);
else if(Liderid == Mafia) SetPlayerSkin(id,MafiaSkin[0]);
else if(Liderid == GavioesDaFiel) SetPlayerSkin(id,GavioesSkin[0]);
else if(Liderid == ManchaVerde) SetPlayerSkin(id,MVSkin[0]);
else if(Liderid == TorcidaJovemDoGremio) SetPlayerSkin(id,TJGSkin[0]);
else if(Liderid == RacaRubroNegra) SetPlayerSkin(id,RRNSkin[0]);
PlayerInfo[id][Skin] = GetPlayerSkin(id);
new Float:x,Float:y,Float:z;
GetPlayerPos(id,x,y,z);
SetPlayerPos(id,x,y,z);
format(var, sizeof(var), "[PSBR]: Vocк foi setado como lнder da organizaзгo de ID %i.",Liderid);
SendClientMessage(id,BroadCastColor, var);
SendClientMessage(id,BroadCastColor,"[PSBR]: Vocк setou este player como lнder de uma Org.");
return true;
}
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(3282) : warning 204: symbol is assigned a value that is never used: "pPos"
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(8865) : error 047: array sizes do not match, or destination array is too small
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(8868) : error 047: array sizes do not match, or destination array is too small
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(15590) : warning 225: unreachable code
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(1221) : warning 204: symbol is assigned a value that is never used: "BolsaDeValoresPick"
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(1981) : warning 204: symbol is assigned a value that is never used: "ComputadorPick"
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(1252) : warning 204: symbol is assigned a value that is never used: "EnterHospitalPick"
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(1254) : warning 204: symbol is assigned a value that is never used: "ExitHospitalPick"
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(1230) : warning 204: symbol is assigned a value that is never used: "FaculdadePick"
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(1233) : warning 204: symbol is assigned a value that is never used: "GaragemJailPick"
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(1233 -- 18552) : warning 203: symbol is never used: "GetPointDistanceToPointExMorph"
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(1255) : warning 204: symbol is assigned a value that is never used: "HospitalPick"
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(1236) : warning 204: symbol is assigned a value that is never used: "LimparPick"
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(1258) : warning 204: symbol is assigned a value that is never used: "MacumbaPick"
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(1161) : warning 204: symbol is assigned a value that is never used: "MainTimer"
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(1242) : warning 204: symbol is assigned a value that is never used: "PizzaPick"
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(1260) : warning 204: symbol is assigned a value that is never used: "RezaPick"
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(1989) : warning 204: symbol is assigned a value that is never used: "on501vehicle"
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(1990) : warning 204: symbol is assigned a value that is never used: "on702vehicle"
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(1990 -- 18552) : warning 203: symbol is never used: "pCPActive"
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(1990 -- 18552) : warning 203: symbol is never used: "pCPID"
D:\PCS-SAMP\Servidor\gamemodes\psa.pwn(1990 -- 18552) : warning 203: symbol is never used: "soundID"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
var = strtok(cmdtext,idx);
if(!strlen(var)) return SendClientMessage(playerid,ErrorColor,"[PSBR]: /darlider [IDPlayer] [LiderID (0(Desempregado)~16)]");
id = ReturnUser(var);
var = strtok(cmdtext,idx);
Obrigado, persebi que se codigo ficou bem mais limpo e facil de entender, mas agora ele me apresenta 2 erros na compilaзгo:
pawn Код:
pawn Код:
|
if(strcmp(cmd,"/darlider",true)==0)
{
new var[256], id, Liderid;
var = strtok(cmdtext,idx);
if(!strlen(var)) return SendClientMessage(playerid,ErrorColor,"[PSBR]: /darlider [IDPlayer] [LiderID (0(Desempregado)~16)]");
id = ReturnUser(var);
var = strtok(cmdtext,idx);
if(!strlen(var)) return SendClientMessage(playerid,ErrorColor,"[PSBR]: /darlider [IDPlayer] [LiderID (0(Desempregado)~16)]");
Liderid = strval(var);
if(PlayerInfo[playerid][Admin] < 4) return SendClientMessage(playerid,ErrorColor,"[PSBR]: Vocк nгo й Administrador.");
if(Liderid > 16 || Liderid < 0) return SendClientMessage(playerid,ErrorColor,"[PSBR]: /darlider [IDPlayer] [LiderID (0(Desempregado)~16)]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,ErrorColor,"[PSBR]: Jogador Disconectado.");
new FilePathInfo[256];
switch(Liderid)
{
case Mendigo:
{
format(FilePathInfo,sizeof(FilePathInfo),"%sOrg%d.ini",OrgFiles,PlayerInfo[id][Org]);
dini_Set(FilePathInfo,"Lider","Ninguйm");
LoadOrgInfo(PlayerInfo[id][Org]);
}
default:
{
format(FilePathInfo,sizeof(FilePathInfo),"%sOrg%d.ini",OrgFiles,Liderid);
dini_Set(FilePathInfo,"Lider",PlayerInfo[id][Name]);
LoadOrgInfo(Liderid);
}
}
PlayerInfo[id][Org] = Liderid;
PlayerInfo[id][Lider] = Liderid;
PlayerInfo[id][Cargo] = 6;
RemovePlayerFromVehicle(playerid);
if(Liderid == Mendigo) SetPlayerSkin(id,94),PlayerInfo[playerid][Cargo] = 0;
else if(Liderid == PM) SetPlayerSkin(id,PMSkin[0]);
else if(Liderid == PF) SetPlayerSkin(id,PFSkin[0]);
else if(Liderid == GOE) SetPlayerSkin(id,GOESkin[0]);
else if(Liderid == Exercito) SetPlayerSkin(id,ExercitoSkin[0]);
else if(Liderid == FAB) SetPlayerSkin(id,FABSkin[0]);
else if(Liderid == FARC) SetPlayerSkin(id,FARCSkin[0]);
else if(Liderid == AlQaeda) SetPlayerSkin(id,AlQaedaSkin[0]);
else if(Liderid == Governo) SetPlayerSkin(id,GovernoSkin[0]);
else if(Liderid == Assassino) SetPlayerSkin(id,AssassinoSkin[0]);
else if(Liderid == Reporter) SetPlayerSkin(id,ReporterSkin[0]);
else if(Liderid == Yakuza) SetPlayerSkin(id,YakuzaSkin[0]);
else if(Liderid == Mafia) SetPlayerSkin(id,MafiaSkin[0]);
else if(Liderid == GavioesDaFiel) SetPlayerSkin(id,GavioesSkin[0]);
else if(Liderid == ManchaVerde) SetPlayerSkin(id,MVSkin[0]);
else if(Liderid == TorcidaJovemDoGremio) SetPlayerSkin(id,TJGSkin[0]);
else if(Liderid == RacaRubroNegra) SetPlayerSkin(id,RRNSkin[0]);
PlayerInfo[id][Skin] = GetPlayerSkin(id);
new Float:x,Float:y,Float:z;
GetPlayerPos(id,x,y,z);
SetPlayerPos(id,x,y,z);
format(var, sizeof(var), "[PSBR]: Vocк foi setado como lнder da organizaзгo de ID %i.",Liderid);
SendClientMessage(id,BroadCastColor, var);
SendClientMessage(id,BroadCastColor,"[PSBR]: Vocк setou este player como lнder de uma Org.");
return true;
}
Muito obrigado agora funcionou perfeitamente, so estou com um problema no servidor que os objetos estao transparentes ou nem aparecer, alguem sabe como resolver?
|