Some Thing Strange - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Some Thing Strange (
/showthread.php?tid=255987)
Some Thing Strange -
misho1 - 18.05.2011
Hi
There Some Thing Strange In Shadow's Random Message
When i Add New Message I Got Error But When Edit The Old Messages I Don't Get Error
pawn Код:
#include <a_samp>
new Text:ShadowsRandom;
forward RandomMessage();
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" RandomMessages by Shadow");
print("--------------------------------------\n");
SetTimer("RandomMessage",3000,2);
ShadowsRandom = TextDrawCreate(18.000000,428.000000,"We are apart of Emerald-Gaming!");
TextDrawAlignment(ShadowsRandom,0);
TextDrawBackgroundColor(ShadowsRandom,0x000000ff);
TextDrawFont(ShadowsRandom,2);
TextDrawLetterSize(ShadowsRandom,0.199999,0.899999);
TextDrawColor(ShadowsRandom,0xffffffff);
TextDrawSetOutline(ShadowsRandom,1);
TextDrawSetProportional(ShadowsRandom,1);
TextDrawSetShadow(ShadowsRandom,1);
return 1;
}
new RandomMessages[][] =
{
"Have you seen a hacker/cheater? use /report [ID] [Reason]",
"If You Disobey The Rules You Will Get Ban To Read The Rules Type /Rules",
"Join To The Server's Forum FreeRoamWorld.Smffy.Com",
"This Server For Fun and Every Thing That You Wan't Will Come!!",
"If You Need Help Type /cmds",
"If You Are admin and you didn't register so your admin level will not save to register type /register [password]",
"If you like this server type /register [password]",
"Have Idea Tell IT in our forum FreeRoamWorld.Smffy.Com",
"The Server Name Changed Into FreeRoam World And The Forum Changed Too",
"The New Forum FreeRoamWorld.Smffy.com",
};
public RandomMessage()
{
TextDrawSetString(ShadowsRandom, RandomMessages[random(sizeof(RandomMessages))]);
return 1;
}
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid, ShadowsRandom);
return 1;
}]
Here The Errors
Код:
F:\FreeRoam World\filterscripts\rm1.pwn(41) : error 029: invalid expression, assumed zero
F:\FreeRoam World\filterscripts\rm1.pwn(41) : error 008: must be a constant expression; assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Re: Some Thing Strange -
MyLife - 18.05.2011
Remove " , " in line 41.
pawn Код:
#include <a_samp>
new Text:ShadowsRandom;
forward RandomMessage();
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" RandomMessages by Shadow");
print("--------------------------------------\n");
SetTimer("RandomMessage",3000,2);
ShadowsRandom = TextDrawCreate(18.000000,428.000000,"We are apart of Emerald-Gaming!");
TextDrawAlignment(ShadowsRandom,0);
TextDrawBackgroundColor(ShadowsRandom,0x000000ff);
TextDrawFont(ShadowsRandom,2);
TextDrawLetterSize(ShadowsRandom,0.199999,0.899999);
TextDrawColor(ShadowsRandom,0xffffffff);
TextDrawSetOutline(ShadowsRandom,1);
TextDrawSetProportional(ShadowsRandom,1);
TextDrawSetShadow(ShadowsRandom,1);
return 1;
}
new RandomMessages[][] =
{
"Have you seen a hacker/cheater? use /report [ID] [Reason]",
"If You Disobey The Rules You Will Get Ban To Read The Rules Type /Rules",
"Join To The Server's Forum FreeRoamWorld.Smffy.Com",
"This Server For Fun and Every Thing That You Wan't Will Come!!",
"If You Need Help Type /cmds",
"If You Are admin and you didn't register so your admin level will not save to register type /register [password]",
"If you like this server type /register [password]",
"Have Idea Tell IT in our forum FreeRoamWorld.Smffy.Com",
"The Server Name Changed Into FreeRoam World And The Forum Changed Too",
"The New Forum FreeRoamWorld.Smffy.com"
};
public RandomMessage()
{
TextDrawSetString(ShadowsRandom, RandomMessages[random(sizeof(RandomMessages))]);
return 1;
}
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid, ShadowsRandom);
return 1;
}
^_^