19.10.2014, 10:49
Код:
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; }