Formating Pawn Problem...
#1

Hello SA:MP!I have a little big problem,but very unusual one.I have been tried to format a command string for a two-language command,for a personal BUD Admin System.
Here is the command:
Код:
CMD:goto(playerid,params[])
{
	new toplayerid,Float:Pos[3],interior,vw,rogoto[512],enggoto[512];
	if(sscanf(params,"u",toplayerid))
	{
	if(limba[playerid] == 0) return SendClientMessage(playerid,0xFF0000FF,"Utilizare comanda:/goto <Playerid|Name>");
	if(limba[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"Command Syntax:/goto <Playerid|Name>");
	}
	if(PInfo[playerid][Admin] < 2)
	{
	if(limba[playerid] == 0) return SendClientMessage(playerid,0xFF0000FF,"Trebuie sa ai minim level 2 pentru a utiliza aceasta comanda!");
	if(limba[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You must to be admin level 2 to use this command!");
	}
	if(!IsPlayerConnected(toplayerid))
	{
	if(limba[playerid] == 0) return SendClientMessage(playerid,0xFF0000FF,"Acest player nu este conectat!");
	if(limba[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"This player isn't connected!");
	}
	GetPlayerPos(toplayerid,Pos[0],Pos[1],Pos[2]);
	SetPlayerPos(playerid,Pos[0]+1,Pos[1],Pos[2]);
	interior = GetPlayerInterior(toplayerid);
	vw = GetPlayerVirtualWorld(toplayerid);
	SetPlayerInterior(playerid,interior);
	SetPlayerVirtualWorld(playerid,vw);
	if(limba[playerid] == 0)
	{
	format(rogoto,sizeof(rogoto),"{FF0000}Royal {FF8800}Stunt {00FF00}Gaming {FFFFFF}AdmCmd:Adminul {FF0000}%s{FFFFFF}[ID:%d] s-a teleportat la playerul {FF0000}%s{FFFFFF}[ID:%d]!",GetName(playerid),playerid,GetName(toplayerid),toplayerid);
	SendClientMessageToAll(-1,rogoto);
	}
	if(limba[playerid] == 1)
	{
	format(enggoto,sizeof(enggoto),"{FF0000}Royal {FF8800}Stunt {00FF00}Gaming {FFFFFF}AdmCmd:Admininstrator {FF0000}%s{FFFFFF}[ID:%d] has go to player {FF0000}%s{FFFFFF}[ID:%d]!",GetName(playerid),playerid,GetName(toplayerid),toplayerid);
	SendClientMessageToAll(-1,enggoto);
	}
	return 1;
}
The two formats are the same thing,but first is in Romanian,and second is in English...Ca you help me?If you help me,I will give you a +1 reputation!Thanks
Reply
#2

pawn Код:
CMD:goto(playerid,params[])
{
    new toplayerid,Float:Pos[3],interior,vw,rogoto[512],enggoto[512];
    if(sscanf(params,"u",toplayerid))
    {
    if(limba[playerid] == 0) return SendClientMessage(playerid,0xFF0000FF,"Utilizare comanda:/goto <Playerid|Name>");
    else if(limba[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"Command Syntax:/goto <Playerid|Name>");
    }
    if(PInfo[playerid][Admin] < 2)
    {
    if(limba[playerid] == 0) return SendClientMessage(playerid,0xFF0000FF,"Trebuie sa ai minim level 2 pentru a utiliza aceasta comanda!");
    else if(limba[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You must to be admin level 2 to use this command!");
    }
    if(!IsPlayerConnected(toplayerid))
    {
    if(limba[playerid] == 0) return SendClientMessage(playerid,0xFF0000FF,"Acest player nu este conectat!");
    else if(limba[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"This player isn't connected!");
    }
    GetPlayerPos(toplayerid,Pos[0],Pos[1],Pos[2]);
    SetPlayerPos(playerid,Pos[0]+1,Pos[1],Pos[2]);
    interior = GetPlayerInterior(toplayerid);
    vw = GetPlayerVirtualWorld(toplayerid);
    SetPlayerInterior(playerid,interior);
    SetPlayerVirtualWorld(playerid,vw);
    if(limba[playerid] == 0)
    {
    format(rogoto,sizeof(rogoto),"{FF0000}Royal {FF8800}Stunt {00FF00}Gaming {FFFFFF}AdmCmd:Adminul {FF0000}%s{FFFFFF}[ID:%d] s-a teleportat la playerul {FF0000}%s{FFFFFF}[ID:%d]!",GetName(playerid),playerid,GetName(toplayerid),toplayerid);
    SendClientMessageToAll(-1,rogoto);
    }
    else if(limba[playerid] == 1)
    {
    format(enggoto,sizeof(enggoto),"{FF0000}Royal {FF8800}Stunt {00FF00}Gaming {FFFFFF}AdmCmd:Admininstrator {FF0000}%s{FFFFFF}[ID:%d] has go to player {FF0000}%s{FFFFFF}[ID:%d]!",GetName(playerid),playerid,GetName(toplayerid),toplayerid);
    SendClientMessageToAll(-1,enggoto);
    }
    return 1;
}
Reply
#3

It doesn't work
Reply
#4

Quote:
Originally Posted by burnfire
Посмотреть сообщение
It doesn't work
Whats wrong with this code?
Reply
#5

The final message doesn't appear...
Reply
#6

BUMP X(
Reply
#7

BUMP!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)