Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Snippet Showroom => Topic started by: MatheuS on July 20, 2012, 07:17:55 pm
-
[pawn]else if ( strcmp( cmd, "vip", true ) == 0 )
{
tmp = strtok( cmdtext, idx );
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
else if ( !strlen( tmp ) ) { SendClientMessage( playerid, COLOR_GREEN, "USAGE: /c vip [Message]" ); }
else
{
new szMsg[ 128 ];
format( szMsg, 128, "** vip %s: %s", gPlayers[ playerid ], cmdtext[ 3 ] );
SendClientMessageToAll( RED, szMsg );
}
return 1;
}[/pawn]
-
Use snippet showroom.
-
else if ( strcmp( cmd, "t", true ) == 0 ){
for(i = 0; i < MAX_PLAYERS; i++)
{
new Float:tX,Float:tY,Float:tZ;
GetPlayerPos(playerid,tX,tY,tZ);
if(PlayerToPoint(15.0,i,tX,tY,tZ))
{
new str[ 128 ];
format(str,128, "[%s]Dice:%s.",gPlayers[ playerid ],cmdtext[2]);
SendClientMessage(i,COLOR_YELLOW,str);
}
}
return 1;
}
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}
agradescan por lo menos los noobs
{ (Abraham_Blanco) && [Professsional-Spawno-Scripts] }
(http://img3.imageshack.us/img3/586/mifirmay.jpg)
-
buena Abraham the best..... en serio bajale los humos a tu cabeza "dilson version venezolano"
-
"SendClientMessageToAll" isn't set to send a message to all online players ?
You need to use "SendClientMessage" to all VIPs online .