/*if(strcmp(cmd, "/wisper", true) == 0 || strcmp(cmd, "/w", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pSupporter] >= 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "NUTZUNG: (/w)isper [playerid/PartOfName] [text]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[100];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "NUTZUNG: (/w)isper [playerid/PartOfName] [text]");
return 1;
}
if(PlayerInfo[playerid][pAdmin] >= 1)
{
format(string,sizeof(string),"%d Admin %s(%d) sagt dir: %s",PlayerInfo[playerid][pAdmin],sendername,playerid,result);
}
else if(PlayerInfo[playerid][pSupporter] >= 1)
{
format(string,sizeof(string),"%d Supporter %s(%d) sagt dir: %s",PlayerInfo[playerid][pSupporter],sendername,playerid,result);
}
format(string, sizeof(string), "Du sagts %s(%d):%s",giveplayer,giveplayerid,result);
SendClientMessage(playerid, COLOR_YELLOW, string);
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_GRAD1," Der Spieler ist offline!");
}
}
return 1;
}*/
Wo liegt hier der Fehler?
-
-
ist das genau so in deinem Script drinnen?
EDIT: Wenn ja dann versuch es ma so
if(strcmp(cmd, "/wisper", true) == 0 || strcmp(cmd, "/w", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pSupporter] >= 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "NUTZUNG: (/w)isper [playerid/PartOfName] [text]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[100];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "NUTZUNG: (/w)isper [playerid/PartOfName] [text]");
return 1;
}
if(PlayerInfo[playerid][pAdmin] >= 1)
{
format(string,sizeof(string),"%d Admin %s(%d) sagt dir: %s",PlayerInfo[playerid][pAdmin],sendername,playerid,result);
}
else if(PlayerInfo[playerid][pSupporter] >= 1)
{
format(string,sizeof(string),"%d Supporter %s(%d) sagt dir: %s",PlayerInfo[playerid][pSupporter],sendername,playerid,result);
}
format(string, sizeof(string), "Du sagts %s(%d):%s",giveplayer,giveplayerid,result);
SendClientMessage(playerid, COLOR_YELLOW, string);
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_GRAD1," Der Spieler ist offline!");
}
}
return 1;
} -
das /* und das */ weg machen
//edit : Oben unten das weg machen.
-
breadfish.de
Hat das Thema geschlossen.