hi
kann mir einer evtl. helfen
und mir nicht nur die antwort sondern auch erklären warum es bei mir nicht geht sagen
mein problem:
job hure soll man an 2 stellen stellen ausüben können
ich wollte es erstmal mit 1nen bereich testen
bei sieht es jetzt so aus
hier forward
forward IsAtBereich(playerid);
der public
public IsAtBereich(playerid)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(3.0,playerid,565.7761, 516.3392, -1437.102))
{
return 1;
}
}
return 0;
}
der /sex befehl
if(strcmp(cmd, "/sex", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pJob] == 3)
{
if(IsAtBereich(playerid))
{
SendClientMessage(playerid,COLOR_RED,"Du befindest dich nicht im richtigem Radius!");
return 1;
}
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " You can only have Sex in a Car !");
return 1;
}
new Car = GetPlayerVehicleID(playerid);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "BENUTZUNG: /sex [playerid/PartOfName] [price]");
return 1;
}
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
new money;
money = strval(tmp);
if(money < 1 || money > 99999) { SendClientMessage(playerid, COLOR_GREY, " Price not lower then 1, or above 99999!"); return 1; }
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot have Sex with yourself!"); return 1; }
if(IsPlayerInAnyVehicle(playerid) && IsPlayerInVehicle(giveplayerid, Car))
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* You offerd %s to have Sex with you, for $%d.", giveplayer, money);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Whore %s has offerd you to have Sex with her, for $%d (type /accept sex) to accept.", sendername, money);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
SexOffer[giveplayerid] = playerid;
SexPrice[giveplayerid] = money;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You or the other player must be in a Car together !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Dieser Spieler ist nicht in deiner Nähe.");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Dieser Spieler ist Offline.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Du bist keine Hure !");
}
}//not connected
return 1;
}
mfg