10.04.2013, 20:07
Se utiliza %s para definir strings. Estбs usando %d (Se usa para integrers) en ves de %s. Despuйs el comando serнa asн
pawn Код:
CMD:crearhq(playerid, params[])
{
if(PlayerInfo[playerid][Admin] != 2013) return SendClientMessage(playerid, -1, "{00CED1}[ERROR]{FFFFFF} Tu no eres administrador!");
new Float:eX,Float:eY,Float:eZ;
new pInt;
if(!sscanf(params, "s[128]ifff",Nombrehq,pInt,pInt,eX,eY,eZ)) return SendClientMessage(playerid,-1,"{FF8C00}Uso:{FFFFFF}/crearhq [Nombre de HQ] [interior] [cordenada x interior] [cordenada y interior] [cordenada z interior]");
GetPlayerPos(playerid, PickupHQ[playerid][Entrada_x],PickupHQ[playerid][Entrada_y],PickupHQ[playerid][Entrada_z]);
PickupHQ[playerid][Salida_x] = eX;//almacenamos las cordenadas de los paremetros
PickupHQ[playerid][Salida_y] = eY;
PickupHQ[playerid][Salida_z] = eZ;
format(PickupHQ[playerid][NombreHQs], 128, "%s", Nombrehq);
PickupHQ[playerid][Int] = pInt;
PickupHQ[playerid][VW] = pInt+100;
pHQ[playerid] = CreatePickup(1239, 1, PickupHQ[playerid][Entrada_x],PickupHQ[playerid][Entrada_y],PickupHQ[playerid][Entrada_z]);
new str[128];
format(str, sizeof(str), "{94AEE6}%s{FFFFFF}\nUtiliza /entrar", Nombrehq);
LabelHq[playerid] = Create3DTextLabel(str,0xFFFFFFFF,PickupHQ[playerid][Entrada_x],PickupHQ[playerid][Entrada_y],PickupHQ[playerid][Entrada_z],20,0);
ActualizarHQ(playerid);
return 1;
}