else if(dialogid == 104) { if(response) { new player[MAX_PLAYER_NAME],name[MAX_PLAYER_NAME]; if(strval(inputtext) == player) { new id = GetPlayeridMid(player); if(id==INVALID_PLAYER_ID) { SendClientMessage(playerid,RED,"* Tokio zaidejo nera."); return 1; } if(GetPlayerInterior(id) != 0) { SendClientMessage(playerid,RED,"* Zaidejo pozicijos nustatyti neimanoma."); return 1; } new kas[128],kiek[128],Float:coo[6]; GetPlayerName(id,name,sizeof(name)); GetPlayerPos(id,coo[0],coo[1],coo[2]); GetPlayerPos(playerid,coo[3],coo[4],coo[5]); new Float:atstumas = ((floatabs(coo[0]-coo[3])+floatabs(coo[1]-coo[4])+floatabs(coo[2]-coo[5]))/3)/100; SetPlayerCheckpoint(playerid,coo[0],coo[1],coo[2],2); format(kas,sizeof(kas),"%s",name); format(kiek, sizeof(kiek), "%f KM",atstumas); TextDrawSetString(Mapp[playerid][0], kas); TextDrawSetString(Mapp[playerid][1], kiek); Map[playerid] = SetTimerEx("MAPP",500,true,"i",playerid,id); return 1; } } return 1; }
if(strval(inputtext) == player[playerid])
else if(dialogid == 104) { if(response) { new player[MAX_PLAYER_NAME],name[MAX_PLAYER_NAME]; if(strval(inputtext) == player[playerid]) { new id = GetPlayeridMid(player); if(id==INVALID_PLAYER_ID) { SendClientMessage(playerid,RED,"* This player doesn't exists."); return 1; } if(GetPlayerInterior(id) != 0) { SendClientMessage(playerid,RED,"* Zaidejo pozicijos nustatyti neimanoma."); return 1; } new kas[128],kiek[128],Float:coo[6]; GetPlayerName(id,name,sizeof(name)); GetPlayerPos(id,coo[0],coo[1],coo[2]); GetPlayerPos(playerid,coo[3],coo[4],coo[5]); new Float:atstumas = ((floatabs(coo[0]-coo[3])+floatabs(coo[1]-coo[4])+floatabs(coo[2]-coo[5]))/3)/100; SetPlayerCheckpoint(playerid,coo[0],coo[1],coo[2],2); format(kas,sizeof(kas),"%s",name); format(kiek, sizeof(kiek), "%f KM",atstumas); TextDrawSetString(Mapp[playerid][0], kas); TextDrawSetString(Mapp[playerid][1], kiek); Map[playerid] = SetTimerEx("MAPP",500,true,"i",playerid,id); return 1; } } return 1; }
new player
else if(dialogid == 104)
{
if(response)
{
new player[MAX_PLAYER_NAME],name[MAX_PLAYER_NAME];
if(sscanf(inputtext, "u", player))
{
SendClientMessage(playerid,RED,"* This player doesn't exists.");
return 1;
}
if(GetPlayerInterior(id) != 0)
{
SendClientMessage(playerid,RED,"* Zaidejo pozicijos nustatyti neimanoma.");
return 1;
}
new kas[128],kiek[128],Float:coo[6];
GetPlayerName(id,name,sizeof(name));
GetPlayerPos(id,coo[0],coo[1],coo[2]);
GetPlayerPos(playerid,coo[3],coo[4],coo[5]);
new Float:atstumas = ((floatabs(coo[0]-coo[3])+floatabs(coo[1]-coo[4])+floatabs(coo[2]-coo[5]))/3)/100;
SetPlayerCheckpoint(playerid,coo[0],coo[1],coo[2],2);
format(kas,sizeof(kas),"%s",name);
format(kiek, sizeof(kiek), "%f KM",atstumas);
TextDrawSetString(Mapp[playerid][0], kas);
TextDrawSetString(Mapp[playerid][1], kiek);
Map[playerid] = SetTimerEx("MAPP",500,true,"i",playerid,id);
return 1;
}
}
return 1;
}
Try this
pawn Код:
|
Am I just talking to myself here? You ignored my first post, till someone else made the same suggestion; then ignored my second post and complained about the problem I already explained how to fix!
|
else if(dialogid == 104)
{
if(response)
{
new player[MAX_PLAYER_NAME],name[MAX_PLAYER_NAME];
if(GetPlayerInterior(id) != 0)
{
SendClientMessage(playerid,RED,"* Zaidejo pozicijos nustatyti neimanoma.");
return 1;
}
if(!sscanf(inputtext, "u", player))
{
new kas[128],kiek[128],Float:coo[6];
GetPlayerName(id,name,sizeof(name));
GetPlayerPos(id,coo[0],coo[1],coo[2]);
GetPlayerPos(playerid,coo[3],coo[4],coo[5]);
new Float:atstumas = ((floatabs(coo[0]-coo[3])+floatabs(coo[1]-coo[4])+floatabs(coo[2]-coo[5]))/3)/100;
SetPlayerCheckpoint(playerid,coo[0],coo[1],coo[2],2);
format(kas,sizeof(kas),"%s",name);
format(kiek, sizeof(kiek), "%f KM",atstumas);
TextDrawSetString(Mapp[playerid][0], kas);
TextDrawSetString(Mapp[playerid][1], kiek);
Map[playerid] = SetTimerEx("MAPP",500,true,"i",playerid,id);
}
}
}
return 1;
}
pawn Код:
|