Problem with a script!
#1

I have got a problem on a script

That work PERFECLY in 0.3a
But with the 0.3b that work badly !!!Don't work correcly at all(the player are bad positionated)

public OnPlayerCommandText(playerid, cmdtext[])
{

new cmd[256];
new kissedid, idx;

cmd = strtok(cmdtext, idx);


if(strcmp(cmd, "/kissme", true) == 0) {
new tmp[256];
tmp = strtok(cmdtext, idx);

if(!strlen(tmp)) {
SendClientMessage(playerid, 0xFFFFFFFF, "/kissme [id]");
return 1;
}
kissedid = strval(tmp);

if(!IsPlayerConnected(kissedid)) {
SendClientMessage(playerid, 0xFF0000FF, "Il giocatore non и connesso");
return 1;
}
if(playerid == kissedid){SendClientMessage(playerid,0xFF0000FF,"N on puoi baciarti da solo");return 1;
}else{
new Float:cx, Float:cy, Float:cz;
new Float:kx, Float:ky, Float:kz;
GetPlayerPos(playerid,cx,cy,cz);
GetPlayerPos(kissedid,kx,ky,kz);
if((cx-kx <= 5)&&(cx-kx >= -5)&&(cy-ky <= 5)&&(cy-ky >= -5))
{
SetPlayerPos(kissedid,cx+0.9,cy,cz);
SetPlayerFacingAngle(playerid,270.0);
SetPlayerFacingAngle(kissedid,90.0);
OnePlayAnim(playerid, "KISSING", "Playa_Kiss_02", 4.0, 0, 0, 0, 0, 0);
OnePlayAnim(kissedid, "KISSING", "Grlfrd_Kiss_02", 4.0, 0, 0, 0, 0, 0);
SetPlayerInterior(kissedid,GetPlayerInterior(playe rid));
SetPlayerVirtualWorld(kissedid,GetPlayerVirtualWor ld(playerid));
return 1;
}else{SendClientMessage(playerid,0xFF0000FF,"Il giocatore и troppo distante");return 1;}

}}


return 0;
}


someone can tell me the problem??
Reply
#2

up up up

Plese...gimme an help
Reply
#3

First it sint your script, right?

second

SetPlayerVirtualWorld(kissedid,GetPlayerVirtualWor ld(playerid));

Wor ld ??
Reply
#4

In pawno "world" is write correcly
Reply
#5

lol no1 helping, as usual...

try instead of:
pawn Код:
new Float:cx, Float:cy, Float:cz;
new Float:kx, Float:ky, Float:kz;
GetPlayerPos(playerid,cx,cy,cz);
GetPlayerPos(kissedid,kx,ky,kz);
if((cx-kx <= 5)&&(cx-kx >= -5)&&(cy-ky <= 5)&&(cy-ky >= -5))
this:
pawn Код:
new kissedID = GetClosestPlayer(playerid);

if(GetDistanceBetweenPlayers(playerid,kissedID) < 5)
{
        new Float:cx, Float:cy, Float:cz;
        GetPlayerPos(playerid,cx+0.9,cy,cz);

        SetPlayerPos(kissedid, cx, cy, cz);
               
        SetPlayerFacingAngle(playerid, 270);
        SetPlayerFacingAngle(kissedid, 90);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)