|
|
#1 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Jan 2012
Location: Earth
Posts: 408
Reputation: 22
|
Hello!
I know that a lot of people will disagree with this post cause its nub... I have posted this due to I saw a lot of people asking for RP commands like /me /do /s /l and so on... Okay here is the code of them:: Code:
//==============================================================================
CMD:me(playerid, params[])// By YOUICE
{
if(gPlayerLogged{playerid} == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You're not logged in.");
return 1;
}
if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /me [action]");
new string[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s %s", name, params);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
//==============================================================================
CMD:do(playerid, params[])// By YOUICE
{
if(gPlayerLogged{playerid} == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You're not logged in.");
return 1;
}
if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /do [action]");
new string[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s ((%s))", params, name);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
//==============================================================================
CMD:shout(playerid, params[]) {// By YOUICE
return cmd_s(playerid, params);
}
//==============================================================================
CMD:s(playerid, params[])// By YOUICE
{
if(gPlayerLogged{playerid} == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You're not logged in.");
return 1;
}
if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/s)hout [shout chat]");
new string[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "(shouts) %s!", params);
SetPlayerChatBubble(playerid,string,COLOR_WHITE,60.0,5000);
format(string, sizeof(string), "%s shouts: %s!", name, params);
ProxDetector(30.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_FADE1,COLOR_FADE2);
return 1;
}
//==============================================================================
CMD:low(playerid, params[]) {// By YOUICE
return cmd_l(playerid, params);
}
//==============================================================================
CMD:l(playerid, params[])// By YOUICE
{
if(gPlayerLogged{playerid} == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You're not logged in.");
return 1;
}
if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/l)ow [close chat]");
new string[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s says quietly: %s", name, params);
ProxDetector(5.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
format(string, sizeof(string), "(quietly) %s", params);
SetPlayerChatBubble(playerid,string,COLOR_WHITE,5.0,5000);
return 1;
}
//==============================================================================
CMD:b(playerid, params[])// By YOUICE
{
if(gPlayerLogged{playerid} == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You're not logged in.");
return 1;
}
if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /b [local ooc chat]");
new string[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s: (( %s ))", name, params);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
return 1;
}
//==============================================================================
Code:
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
//==============================================================================
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
if(IsPlayerConnected(playerid))
{
new Float:posx, Float:posy, Float:posz;
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
{
GetPlayerPos(i, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16))) // If the player is within 16 meters
{
SendClientMessage(i, col1, string);
}
else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8))) // within 8 meters
{
SendClientMessage(i, col2, string);
}
else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4))) //4 meters
{
SendClientMessage(i, col3, string);
}
else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2))) //2 meters
{
SendClientMessage(i, col4, string);
}
else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) //1 meter
{
SendClientMessage(i, col5, string);
}
}
else
{
SendClientMessage(i, col1, string);
}
}
}
return 1;
}
//==============================================================================
Last edited by Youice; 20/06/2012 at 08:55 PM. |
|
|
|
|
|
#2 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jan 2011
Location: -In Ma Bed- Serveur: Corella Infection Pseudo: Boris_Ruskov(admin) IP: Beta Fermé
Posts: 2,329
Reputation: 60
|
pawn Code:
Logic
|
|
|
|
|
|
#3 |
|
Banned
![]() Join Date: Mar 2012
Posts: 103
Reputation: 1
|
cool good work youce
|
|
|
|
|
|
#4 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Nov 2011
Posts: 395
Reputation: 49
|
|
|
|
|
|
|
#5 |
|
Little Clucker
![]() Join Date: Apr 2012
Posts: 37
Reputation: 0
|
thnaks for script Youice. I use in my server.
|
|
|
|
|
|
#6 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Jan 2012
Location: Earth
Posts: 408
Reputation: 22
|
Thank you bro ; )
Np bro : D added thank you! |
|
|
|
|
|
#7 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Oct 2011
Posts: 1,053
Reputation: 190
|
Very easy to make not sure why it is as filterscript since if people asked for these commands so much you could do a tutorial how to make them.
But meh good job. |
|
|
|
|
|
#8 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Jan 2012
Location: Earth
Posts: 408
Reputation: 22
|
If I made a tutorial maybe some people will say what is the use of it if there a lot of tutorials about commands so I decided to make those and post them... any way "meh" thanks.....
|
|
|
|
|
|
#9 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Jan 2012
Location: Pakistan
Posts: 221
Reputation: 8
|
He I am not able to get this in to my game mode can you tell me where should I put what thing?
|
|
|
|
|
|
#10 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Jan 2012
Location: Earth
Posts: 408
Reputation: 22
|
First of all, you must download zcmd.inc (credits to zeex),
after put the zcmd.inc file in pawno > includes, after open your GM put under " #include <a_samp> " (put) "#include <zcmd>" then follow my steps in the thread (up) ^^ |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [FilterScript] Login/Register using ZCMD SSCANF & Y_INI.( Admin commands + VIP System + VIP Commands! ) | Zh3r0 | Filterscripts | 113 | 09/03/2013 05:20 PM |
| Help, no commands will work except for admin commands? | MrPlayboy | Help Archive | 1 | 05/08/2011 12:07 AM |
| Transforming zcmd's commands to regular commands | nuriel8833 | Help Archive | 17 | 08/01/2011 05:41 AM |
| DCMD Commands not working after adding some ZCMD commands :S | [L3th4l] | Help Archive | 4 | 20/01/2010 09:57 PM |