if(!strcmp(cmdtext, "/an", true)){ if(!strlen(params)) return SendClientMessage(playerid,red,"USE: /an <texto>"); return TextDrawSetString(params,newtext,); TextDrawShowForAll(Textdr0); TextDrawShowForAll(Textdr1); TextDrawShowForAll(Textdr2); SetTimer("ChauAnMinigun", 10000, 1); return 1; } public OnGameModeInit() { // Create the textdraws: Textdr0 = TextDrawCreate(491.000000, 154.000000, "_"); TextDrawBackgroundColor(Textdr0, 255); TextDrawFont(Textdraw0, 1); TextDrawLetterSize(Textdr0, 0.500000, 8.000000); TextDrawColor(Textdr0, -1); TextDrawSetOutline(Textdr0, 0); TextDrawSetProportional(Textdr0, 1); TextDrawSetShadow(Textdr0, 1); TextDrawUseBox(Textdr0, 1); TextDrawBoxColor(Textdr0, 136); TextDrawTextSize(Textdr0, 170.000000, 20.000000); Textdr1 = TextDrawCreate(190.000000, 160.000000, "Evento:"); TextDrawBackgroundColor(Textdr1, 255); TextDrawFont(Textdr1, 3); TextDrawLetterSize(Textdr1, 0.500000, 1.000000); TextDrawColor(Textdr1, -1); TextDrawSetOutline(Textdr1, 1); TextDrawSetProportional(Textdr1, 1); Textdr2 = TextDrawCreate(181.000000, 184.000000, "_"); TextDrawBackgroundColor(Textdr2, 255); TextDrawFont(Textdr2, 2); TextDrawLetterSize(Textdr2, 0.780000, 2.199999); TextDrawColor(Textdr2, -1); TextDrawSetOutline(Textdr2, 1); TextDrawSetProportional(Textdr2, 1);
CMD:ann(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid,red,"USE: /ann <texto>");
TextDrawSetString(params, newtext);
TextDrawShowForAll(Textdr0);
TextDrawShowForAll(Textdr1);
TextDrawShowForAll(Textdr2);
SetTimer("ChauAnMinigun", 10000, 1);
return 1;
}
public OnGameModeInit()
{
// Create the textdraws:
Textdr0 = TextDrawCreate(491.000000, 154.000000, "_");
TextDrawBackgroundColor(Textdr0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdr0, 0.500000, 8.000000);
TextDrawColor(Textdr0, -1);
TextDrawSetOutline(Textdr0, 0);
TextDrawSetProportional(Textdr0, 1);
TextDrawSetShadow(Textdr0, 1);
TextDrawUseBox(Textdr0, 1);
TextDrawBoxColor(Textdr0, 136);
TextDrawTextSize(Textdr0, 170.000000, 20.000000);
Textdr1 = TextDrawCreate(190.000000, 160.000000, "Evento:");
TextDrawBackgroundColor(Textdr1, 255);
TextDrawFont(Textdr1, 3);
TextDrawLetterSize(Textdr1, 0.500000, 1.000000);
TextDrawColor(Textdr1, -1);
TextDrawSetOutline(Textdr1, 1);
TextDrawSetProportional(Textdr1, 1);
Textdr2 = TextDrawCreate(181.000000, 184.000000, "_");
TextDrawBackgroundColor(Textdr2, 255);
TextDrawFont(Textdr2, 2);
TextDrawLetterSize(Textdr2, 0.780000, 2.199999);
TextDrawColor(Textdr2, -1);
TextDrawSetOutline(Textdr2, 1);
TextDrawSetProportional(Textdr2, 1);
return 1;
}
if(strcmp(cmd, "/an", true) == 0)
{
new string[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[200];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "ESCRIBE: /an [Texto]");
return 1;
}
TextDrawShowForPlayer(i, Textdr0);
TextDrawShowForPlayer(i, Textdr1);
TextDrawShowForPlayer(i, Textdr2);
SetTimer("ChauAnMinigun", 10000, 1);
format(string, sizeof(string), "%s", result);
TextDrawSetString(Textdr1, string);
}
}
return 1;
}
Amigo me recontra sirvio!!!!!!!!!!!!muchisimas gracias saludos!!!!!
|