So sollte alles richtig sein:
CreatePickup(1239,1231.8610,-918.5385,43.0938,-1);// CNN /ad Punkt
if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0)
{
if(PlayerInfo[playerid][pLevel] >= 2)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " Du bist noch nicht eingeloggt !");
return 1;
}
if(!IsPlayerInRangeOfPoint(playerid,3.0,1231.8610,-918.5385,43.0938))
{
SendClientMessage(playerid, COLOR_RED, "Du bist nicht am CNN Tower");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
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: (/ad)vertise [text]");
return 1;
}
if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1))
{
format(string, sizeof(string), "Bitte Versuch es Später wieder %d sekunden zwischen einer Advertisement !", (addtimer/1000));
SendClientMessage(playerid, COLOR_GRAD2, string);
return 1;
}
Ersetze einfach den von dir geposteten Code mit meinem.