SA-MP Forums Archive
Help me with this :D - 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)
+--- Thread: Help me with this :D (/showthread.php?tid=408915)



Help me with this :D - acajoksa - 19.01.2013

How to make a command such as when typing in Admin /gov to all other players receive a message that he wrote after /gov (/gov your message)
Sorry for my bad English

Tnx if you help me


Re: Help me with this :D - DeathOnaStick - 19.01.2013

pawn Код:
if(IsPlayerAdmin(playerid)&&!strcmp(cmdtext, "/gov")){
SendClientMessageToAll(0xDEEE20FF, cmdtext[4]);
return 1;
}
Probably will do the job. Just try it and report.


Re: Help me with this :D - acajoksa - 19.01.2013

Quote:

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else

main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
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 OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/gov", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid)&&!strcmp(cmdtext, "/gov")){
SendClientMessageToAll(0xDEEE20FF, cmdtext[4]);
return 1;
}
return 0;
}

And this

Quote:

C:\Users\van\Desktop\Samp server\filterscripts\12345.pwn(61) : error 030: compound statement not closed at the end of file (started at line 53)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Help me


Re: Help me with this :D - DeathOnaStick - 19.01.2013

#edit# you edited, I need to re-read your post.


Re: Help me with this :D - acajoksa - 19.01.2013

Plsssssssssssssssssss Help me
Okey i give you reputation


Re: Help me with this :D - DeathOnaStick - 19.01.2013

pawn Код:
#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else

main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
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 OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if(IsPlayerAdmin(playerid)&&!strcmp(cmdtext, "/gov")){
SendClientMessageToAll(0xDEEE20FF, cmdtext[4]);
return 1;
}
return 0;
}



Re: Help me with this :D - acajoksa - 19.01.2013

this does not work when I type /gov just send me a blank line in the Chat



Re: Help me with this :D - DeathOnaStick - 19.01.2013

Try "/gov blablablabla", won't it print "blablablabla"?