Server Help Needed
#1

For some reason, only Id's work in my server and not names. For example when I use /givecash it'll send that money to a random person in the server, not the person I typed. Its usually id 0, that it always gets sent to. However, when I use player ID'S instead of names, all of the cmds work perfectly fine. Its mostly with every command that uses a player name or id like /port, /setlevel and etc...
Anyone know how to fix this problem? Thanks
Reply
#2

Could you provide us with that part of your script ?
Reply
#3

Quote:
Originally Posted by Nodroz
Посмотреть сообщение
Could you provide us with that part of your script ?
This is the code for /givecash:
Quote:

COMMAND:givecash(playerid, params[])
{
// Setup local variables
new Msg[128], Name[24], OtherName[24], OtherPlayer, Money;

// Send the command to all admins so they can see it
SendAdminText(playerid, "/givecash", params);
{

This is the code for /port:
Quote:

SetPlayerPos(playerid, x, y, z);
// Let the player know about it
format(PortMsg, 128, "You have been ported to location: %4.2f, %4.2f, %4.2f", x, y, z);
SendClientMessage(playerid, 0x00FF00FF, PortMsg);
}
}
else

Code for /get:
Quote:

if (sscanf(params, "u", OtherPlayer)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/get <OtherPlayer>\"");
else

Also when I hosted the server on Windows it was working fine, however when I moved to Volt-Host (Linux) this the problem I got.
Reply
#4

I guess you have have 2 times an openening tag.... (See the red)

Код:
COMMAND:givecash(playerid, params[])
{
// Setup local variables
new Msg[128], Name[24], OtherName[24], OtherPlayer, Money;

// Send the command to all admins so they can see it
SendAdminText(playerid, "/givecash", params);
}
Oh, btw, I guess you forgot to add the other part of your script too...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)