#include <a_samp>
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
public OnGameModeInit()
{
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnFilterScriptInit()
{
AddRandomMessage("");
AddRandomMessage("");
AddRandomMessage("");
AddRandomMessage("");
AddRandomMessage("");
AddRandomMessage("");
AddRandomMessage("");
AddRandomMessage("");
AddRandomMessage("");
AddRandomMessage("");
AddRandomMessage("");
AddRandomMessage("");
AddRandomMessage("");
AddRandomMessage("");
SetTimer("SendRandomMessage", MESSAGE_INTERVAL * 1000, 1);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
I removed public OnFilterScriptInit()
and public OnFilterScriptExit() and put all those AddRandomMessage in public OnGameModeInit() But it says now : error 017: undefined symbol "AddRandomMessage" |
//add this somewhere above your ongamemodeinit #define AUTO_MESSAGE_TIME a // Change "a" to a specific time you want i.e 5 new AutoMessages[][] = { // Write Your messages here i.e Hey cheating is not allowed on my server }; //Now you'll need to forward it so that it can be timed on OnGameModeInit() forward AutoMessage(); public AutoMessage() { new string[128]; format(string, sizeof(string), "%s", AutoMessages[random(sizeof(AutoMessages))]); SendClientMessageToAll("YOUR COLOR HERE", string); return 1; } public OnGameModeInit() { SetTimer("AutoMessage",60*1000*AUTO_MESSAGE_TIME,1); return 1; }
forward AutoMessage(); public AutoMessage() { new string[128]; format(string, sizeof(string), "%s", AutoMessages[random(sizeof(AutoMessages))]); new colors = random(5)+1; new color; switch(colors) { case 1: { color = COLOR_FORSTATS; } case 2: { color = COLOR_PURPLE; } case 3: { color = COLOR_LIGHTRED; } case 4: { color = COLOR_GREEN; } case 5: { color = COLOR_CYAN; } } SendClientMessageToAll(color, string); return 1; }
C:\Users\zaki\Desktop\My server\gamemodes\Steve.pwn(3) : error 017: undefined symbol "print"
C:\Users\zaki\Desktop\My server\gamemodes\Steve.pwn(3) : warning 215: expression has no effect
C:\Users\zaki\Desktop\My server\gamemodes\Steve.pwn(3) : error 001: expected token: ";", but found ")"
C:\Users\zaki\Desktop\My server\gamemodes\Steve.pwn(3) : error 029: invalid expression, assumed zero
C:\Users\zaki\Desktop\My server\gamemodes\Steve.pwn(3) : fatal error 107: too many error messages on one line
1 : main()
2 : {
3 : print("\n----------------------------------");
4 : print(" Steven's stunts!");
5 : print("----------------------------------\n");
6 : }
1 : main() <-- on number 1? 2 : { 3 : print("\n----------------------------------"); 4 : print(" Steven's stunts!"); 5 : print("----------------------------------\n"); 6 : }