#1

please convert cmd to strcmp please:

Quote:

#define isnull(%1) \
((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))

CMD:vehtext(playerid,params[])
{
if(isnull(params)) return SendClientMessage(playerid,0xCCCCCCAA,"/vehtext [text]");
new myobject = CreateObject(19353, 0, 0, 10, 0.0, 0.0, 90.0); //create the object
SetObjectMaterialText(myobject, params, 0, OBJECT_MATERIAL_SIZE_256x128,\
"Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
return 1;
}

Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/vehtext", true, 8))
    {
        if(!cmdtext[8]) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /vehtext [text]");
        new myobject = CreateObject(19353, 0, 0, 10, 0.0, 0.0, 90.0); //create the object
        SetObjectMaterialText(myobject, cmdtext[9], 0, OBJECT_MATERIAL_SIZE_256x128,\
        "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
        return 1;
    }
    return 0;
}
Untested, but it should work.
Reply
#3

thank
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)