їMe dicen el error en este comando? -
JeffreyG - 31.07.2014
Cuando tengo "Duty" = 1 y utilizo el comando me tira SERVER:Unknow command.
їMe ayudan a solucionarlo?
pawn Код:
CMD:uniforme(playerid, params[])
{
if(PlayerToPoint(1,playerid,253.2738,77.7066,1003.6406)){
if(Informacion[playerid][Faccion] == 1){
new skins[] = {
284,
281,
280,
265,
266,
267
};
if(Informacion[playerid][Sexo] == 1){
if(Informacion[playerid][Duty] == 0){
Informacion[playerid][Uniforme] = SetPlayerSkin(playerid, skins[random(6)]);
SetPlayerColor(playerid,POLICIA);
SendClientMessage(playerid,POLICIA,"Te pusiste el uniforme de policнa.");
Informacion[playerid][Duty] = 1;
return 1;
}
if(Informacion[playerid][Sexo] == 2){
if(Informacion[playerid][Duty] == 0){
SetPlayerColor(playerid,POLICIA);
SendClientMessage(playerid,POLICIA,"Te pusiste el uniforme de policнa.");
Informacion[playerid][Duty] = 1;
Informacion[playerid][Uniforme] = SetPlayerSkin(playerid,93);
return 1;
}
if(Informacion[playerid][Sexo] == 1){
if(Informacion[playerid][Duty] == 1){
SendClientMessage(playerid,-1,"Dejaste el uniforme de policнa y recuperaste tu ropa.");
SetPlayerSkin(playerid,Informacion[playerid][Skin]);
Informacion[playerid][Duty] = 0;
return 1;
}
if(Informacion[playerid][Sexo] == 2){
if(Informacion[playerid][Duty] == 1){
SendClientMessage(playerid,-1,"Dejaste el uniforme de policнa y recuperaste tu ropa.");
SetPlayerSkin(playerid,Informacion[playerid][Skin]);
Informacion[playerid][Duty] = 0;
return 1;
}
}
}
}
}
}
}
return 0;
}
Y esta lнnea la tengo asн...
pawn Код:
Informacion[playerid][Uniforme] = SetPlayerSkin(playerid, skins[random(6)]);
Pero no me guarda bien el skin que se le coloca al usuario, cuando entro al .ini me sale Uniforme: 1 y no el nъmero del skin.
Respuesta: їMe dicen el error en este comando? -
aoEXE - 01.08.2014
intenta cambiando 'return 0;'
por
Respuesta: їMe dicen el error en este comando? -
OTACON - 01.08.2014
pawn Код:
CMD:uniforme(playerid, params[]){
if(PlayerToPoint(1,playerid,253.2738,77.7066,1003.6406)){
if(Informacion[playerid][Faccion] == 1){
new skins[] = {
284,
281,
280,
265,
266,
267
};
if(Informacion[playerid][Sexo] == 1){
if(Informacion[playerid][Duty] == 0){
Informacion[playerid][Uniforme] = GetPlayerSkin(playerid)]; //=> ACA
SetPlayerSkin(playerid,skins[random(6)); //=> ACA
SetPlayerColor(playerid,POLICIA);
SendClientMessage(playerid,POLICIA,"Te pusiste el uniforme de policнa.");
Informacion[playerid][Duty] = 1;
}
}
else if(Informacion[playerid][Sexo] == 2){
if(Informacion[playerid][Duty] == 0){
SetPlayerColor(playerid,POLICIA);
SendClientMessage(playerid,POLICIA,"Te pusiste el uniforme de policнa.");
Informacion[playerid][Duty] = 1;
Informacion[playerid][Uniforme] = GetPlayerSkin(playerid)]; //=> ACA
Informacion[playerid][Uniforme] = 93; //=> ACA
SetPlayerSkin(playerid,Informacion[playerid][Uniforme]); //=> ACA
}
}
else if(Informacion[playerid][Sexo] == 1){
if(Informacion[playerid][Duty] == 1){
SendClientMessage(playerid,-1,"Dejaste el uniforme de policнa y recuperaste tu ropa.");
SetPlayerSkin(playerid,Informacion[playerid][Skin]);
Informacion[playerid][Duty] = 0;
}
}
else if(Informacion[playerid][Sexo] == 2){
if(Informacion[playerid][Duty] == 1){
SendClientMessage(playerid,-1,"Dejaste el uniforme de policнa y recuperaste tu ropa.");
SetPlayerSkin(playerid,Informacion[playerid][Skin]);
Informacion[playerid][Duty] = 0;
}
}
}
}
return true; //=> ACA
}