SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 22/06/2013, 07:54 PM   #1
burnfire
Big Clucker
 
burnfire's Avatar
 
Join Date: Mar 2013
Posts: 70
Reputation: -3
Default Formating Pawn Problem...

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:
Code:
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
__________________
I am working to an server.Details soon...
If my english is bad,it's because I'm Romanian!
burnfire is offline   Reply With Quote
Old 22/06/2013, 11:07 PM   #2
JustBored
High-roller
 
JustBored's Avatar
 
Join Date: Jan 2013
Location: Buenos Aires - Argentina
Posts: 1,150
Reputation: 134
Default Respuesta: Formating Pawn Problem...

pawn Code:
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;
}
__________________
"Compiler - A program designed to tell you how wrong you are. It's a great way to induce stress and frustration."

JustBored is offline   Reply With Quote
Old 23/06/2013, 01:41 PM   #3
burnfire
Big Clucker
 
burnfire's Avatar
 
Join Date: Mar 2013
Posts: 70
Reputation: -3
Unhappy Re: Formating Pawn Problem...

It doesn't work
__________________
I am working to an server.Details soon...
If my english is bad,it's because I'm Romanian!
burnfire is offline   Reply With Quote
Old 23/06/2013, 01:43 PM   #4
Admigo
High-roller
 
Admigo's Avatar
 
Join Date: Oct 2010
Location: The Netherlands
Posts: 1,840
Reputation: 297
Default Re: Formating Pawn Problem...

Quote:
Originally Posted by burnfire View Post
It doesn't work
Whats wrong with this code?
__________________
Follow me on Instagram @brandonvanommen
Admigo is offline   Reply With Quote
Old 23/06/2013, 01:58 PM   #5
burnfire
Big Clucker
 
burnfire's Avatar
 
Join Date: Mar 2013
Posts: 70
Reputation: -3
Default Re: Formating Pawn Problem...

The final message doesn't appear...
__________________
I am working to an server.Details soon...
If my english is bad,it's because I'm Romanian!
burnfire is offline   Reply With Quote
Old 23/06/2013, 06:42 PM   #6
burnfire
Big Clucker
 
burnfire's Avatar
 
Join Date: Mar 2013
Posts: 70
Reputation: -3
Default Re: Formating Pawn Problem...

BUMP X(
__________________
I am working to an server.Details soon...
If my english is bad,it's because I'm Romanian!
burnfire is offline   Reply With Quote
Old 24/06/2013, 09:13 AM   #7
burnfire
Big Clucker
 
burnfire's Avatar
 
Join Date: Mar 2013
Posts: 70
Reputation: -3
Default Re: Formating Pawn Problem...

BUMP!
__________________
I am working to an server.Details soon...
If my english is bad,it's because I'm Romanian!
burnfire is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text formating problem rAzvAn18 Scripting Help 4 11/05/2013 04:31 PM
Formating error Feastahashi Scripting Help 5 03/12/2012 06:42 PM
formating dialog ajwar Help Archive 1 13/08/2011 10:53 AM


All times are GMT. The time now is 06:02 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.