Command not recognised + Cooordinates
#1

I currently have /achat and I want to change it to /a but when I do I get an unrecognised command.

Quote:

if (strcmp("/achat", cmdtext, true, 6) == 0 && PlayerAdminLevel[playerid] == 1337) // Talk To Other Admins
{
if(strlen(cmdtext) <= 7) {
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /achat (msg)");
return 1;
}
new output[255];
new pname[24];
GetPlayerName(playerid, pname, 24);
strmid(output,cmdtext,7,strlen(cmdtext));
format(string, sizeof(string), "Admin Chat: %s(%d) %s",pname,playerid,output);
printf("%s", string);
for(new i=0;i<MAX_PLAYERS;i++)
{
if(PlayerAdminLevel[i] == 1337) {
format(string, sizeof(string), "Admin Chat: %s(%d) %s",pname,playerid,output);
SendClientMessage(i,0xFF7F50AA,string);
}
}
return 1;
}

My next issue is that I got some coordinates

{2059.8872, 1202.8521, 2120.8960, 1302.8754}

I don't know how I put these into the teleport command.

SetPlayerPos(playerid,);
Reply
#2

Anyone?
Reply
#3

Try this (I not tested):

pawn Код:
if (strcmp("/achat", cmdtext, true, 6) == 0) // Talk To Other Admins
{
if(PlayerAdminLevel[playerid] == 1337)
{
if(strlen(cmdtext) <= 7)
return SendClientMessage(playerid,COLOR_ERROR,"USAGE: /achat (msg)");
new output[255];
new pname[24];
GetPlayerName(playerid, pname, 24);
strmid(output,cmdtext,7,strlen(cmdtext));
format(string, sizeof(string), "Admin Chat: %s(%d): %s",pname,playerid,output);
printf("%s", string);
for(new i=0;i<MAX_PLAYERS;i++)
{
format(string, sizeof(string), "Admin Chat: %s(%d): %s",pname,playerid,output);
SendClientMessage(i,0xFF7F50AA,string);
}
}
return 1;
}
And, to put coordinates in teleport:

pawn Код:
SetPlayerPos(playerid,Float:X,Float:Y,Float:Z);
Exemple:

pawn Код:
SetPlayerPos(playerid,2059.8872, 1202.8521, 2120.8960);

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)