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;
}
new text[128];
if(sscanf(params, "s[128]", text)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /textobject (Text)");
CMD:textobject(playerid,params[])
{
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(16442, 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;
}
[02:28:13] ===============================
[02:28:13] sscanf plugin loaded.
[02:28:13] Version: 2.8.1
[02:28:13] (c) 2012 Alex "******" Cole
[02:28:13] ===============================
pawn Код:
|