[Problema] Mi Sistema
#2

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;
}
Reply


Messages In This Thread
[Problema] Mi Sistema - by sonnkz - 10.04.2013, 19:28
Respuesta: [Problema] Mi Sistema - by JustBored - 10.04.2013, 20:07
Respuesta: [Problema] Mi Sistema - by sonnkz - 10.04.2013, 20:32
Respuesta: [Problema] Mi Sistema - by JuliPera - 10.04.2013, 22:55
Respuesta: [Problema] Mi Sistema - by sonnkz - 10.04.2013, 23:08
Respuesta: [Problema] Mi Sistema - by JustBored - 11.04.2013, 00:04

Forum Jump:


Users browsing this thread: 2 Guest(s)