sscanf
#1

I keep entering text but i get the sscanf message, what have i done wrong?
pawn Код:
CMD:textobject(playerid,params[])
{
    #pragma unused params
    if(!IsCnRAdmin(playerid)) return UnknownCMD(playerid);
    new text[256];
    if(sscanf(params, "s[128]", text)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /textobject (Text)");
    new Float:X, Float:Y, Float:Z, Float:A;
    GetPlayerFacingAngle(playerid, A);
    GetPlayerPos(playerid, X, Y, Z);
    if(strlen(text) < 2) return SendClientMessage(playerid, COLOR_RED, "The Text Length Is Too Short.");
    new myrobject = CreateObject(myzobject,  X+3, Y, Z+1, 0.0, 0.0, A, 300.0);
    SetObjectMaterialText(myrobject, text, 0, OBJECT_MATERIAL_SIZE_256x128,\
    "Arial", 28, 0, COLOR_RED, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
    new result[128];
    format(result,sizeof(result), "The Object is been created with ID %d", myrobject);
    SendClientMessage(playerid, COLOR_RED, result);
    return 1;
}
Reply


Messages In This Thread
sscanf - by Ananisiki - 14.03.2014, 01:24
Re: sscanf - by Threshold - 14.03.2014, 01:29
Re: sscanf - by Ananisiki - 14.03.2014, 01:32
Re: sscanf - by CuervO - 14.03.2014, 01:35
Re: sscanf - by Ananisiki - 14.03.2014, 01:36
Re: sscanf - by CuervO - 14.03.2014, 01:42
Re: sscanf - by Ananisiki - 14.03.2014, 01:44
Re: sscanf - by CuervO - 14.03.2014, 01:44
Re: sscanf - by Ananisiki - 14.03.2014, 01:46
Re: sscanf - by CuervO - 14.03.2014, 01:48

Forum Jump:


Users browsing this thread: 1 Guest(s)