13.02.2012, 19:43
Quote:
A LINHA, A LINHA DO ERRO, A LINHA, NГO O ERRO, A LINHA DE CADA ERRO
|
pawn Код:
if(checknome == checkdp){
SendClientMessage(playerid, verdel,"~> Departamento de Policia <~");
new string2[256];
format(string2, 256,"Vocк tem %d multas no total de R$%d /pagarmultas para paga-las",dini_Int(filena(playerid),"Multas"),dini_Int(filena(playerid),"Multas")*500);
SendClientMessage(playerid,0xFFFFFFAA,string2);
}
IsPlayerInCircle(playerid,Float:x,Float:y,radius)
{
if(GetPlayerDistanceToPoint2(playerid,Float:x,Float:y) < radius)
{
return 1;
}
return 0;
}
GetPlayerDistanceToPoint2(playerid,Float:x,Float:y)
{
new Float:x1,Float:y1,Float:z1; GetPlayerPos(playerid,x1,y1,z1);
new Float:tmpdis = floatsqroot(floatpower(floatabs(floatsub(x,x1)),2)+
floatpower(floatabs(floatsub(y,y1)),2));
return floatround(tmpdis);
}
stock filena(playerid){
new names[MAX_PLAYER_NAME];
GetPlayerName(playerid, names, MAX_PLAYER_NAME);
//new string[256];
//format(string,sizeof string,"/Contas/%s.ini", names);
format(file, sizeof(file), PASTA_CONTAS, names);
return file;
}
GetPlayerDistanceToPoint2(playerid,Float:x,Float:y)
{
new Float:x1,Float:y1,Float:z1; GetPlayerPos(playerid,x1,y1,z1);
new Float:tmpdis = floatsqroot(floatpower(floatabs(floatsub(x,x1)),2)+
floatpower(floatabs(floatsub(y,y1)),2));
return floatround(tmpdis);
}