09.08.2013, 10:57
hi guys i'm trying to find a whisper command like /w [text] i tried to find that cmd but all my search didn't work with me
so i hope you can help me thanks alote


COMMAND:whisper(playerid,params[])
{
new string[250];
if(sscanf(params,"s[250]",string)) return SendClientMessage(playerid,COLOR_RED,"USAGE:/whisper [message]");
SetPlayerChatBubble(playerid,string,COLOR_YELLOW,35,10000);
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
new pName[24];
GetPlayerName(playerid,pName,sizeof(pName));
new string2[250];
format(string2,sizeof(string2),"%s(%d):%s",pName,playerid,string);
for(new i=0;i<=MAX_PLAYERS;i++)
{
if(IsPlayerInRangeOfPoint(i,15.0,x,y,z)) return SendClientMessage(playerid,COLOR_YELLOW,string2);
}
return 1;
}
#include <zcmd>
D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\AmericaVsUK.pwn(291) : warning 217: loose indentation D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\AmericaVsUK.pwn(295) : warning 217: loose indentation D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\AmericaVsUK.pwn(419) : error 029: invalid expression, assumed zero D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\AmericaVsUK.pwn(419) : error 017: undefined symbol "cmd_whisper" D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\AmericaVsUK.pwn(419) : error 029: invalid expression, assumed zero D:\PC_GTA.SanAndreas -(rip)-(ToeD)\samp\gamemodes\AmericaVsUK.pwn(419) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
COMMAND:whisper(playerid,params[]) |
if (strcmp("/w", cmdtext, true, 10) == 0) |
if (strcmp("/w", cmdtext, true, 10) == 0) { new string[250]; if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE:/whisper [message]"); SetPlayerChatBubble(playerid,string,COLOR_YELLOW,35,10000); new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); new pName[24]; GetPlayerName(playerid,pName,sizeof(pName)); new string2[250]; format(string2,sizeof(string2),"%s(%d):%s",pName,playerid,string); for(new i=0;i<=MAX_PLAYERS;i++) { if(IsPlayerInRangeOfPoint(i,15.0,x,y,z)) return SendClientMessage(playerid,COLOR_YELLOW,string2); } return 1; }
SERVER: Unknown command |
ok i change it to this
Код:
if (strcmp("/w", cmdtext, true, 10) == 0) { new string[250]; if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE:/whisper [message]"); SetPlayerChatBubble(playerid,string,COLOR_YELLOW,35,10000); new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); new pName[24]; GetPlayerName(playerid,pName,sizeof(pName)); new string2[250]; format(string2,sizeof(string2),"%s(%d):%s",pName,playerid,string); for(new i=0;i<=MAX_PLAYERS;i++) { if(IsPlayerInRangeOfPoint(i,15.0,x,y,z)) return SendClientMessage(playerid,COLOR_YELLOW,string2); } return 1; } |