29.08.2010, 20:16
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??
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??