SA-MP Forums Archive
Commands doesn't affect to player ID 2 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Commands doesn't affect to player ID 2 (/showthread.php?tid=503216)



Commands doesn't affect to player ID 2 - themaker - 28.03.2014

Hello, I have problem with my gamemod and I can't figure out what's the problem.

I have commands that affects player like /slap [ID/Playername] and that commands work for every player except player with ID 2. Also other commands that affects to players, doesn't make way to player with ID 2.

What can be problem?

Thanks...


Re: Commands doesn't affect to player ID 2 - PrivatioBoni - 28.03.2014

Post your /slap code at least?


Re: Commands doesn't affect to player ID 2 - themaker - 28.03.2014

bump


Re: Commands doesn't affect to player ID 2 - PrivatioBoni - 28.03.2014

Quote:
Originally Posted by themaker
Посмотреть сообщение
bump
How about you read people's posts before mindlessly bumping? Can't be bothered helping impatient people who can't read now anyway.


Re: Commands doesn't affect to player ID 2 - themaker - 28.03.2014

Quote:
Originally Posted by PrivatioBoni
Посмотреть сообщение
Post your /slap code at least?
It's not due to /slap command, she works on other players, just on ID 2, LIKE EVERY OTHER COMMAND, it doesn't work. /slap command was just example...

Quote:

COMMANDlap(playerid, params[]) {
if(PlayerInfo[playerid][pAdmin] >= 1) {
new toplayerid,
Floathealth,
Floatlx, Floatly, Floatlz;

if (!sscanf(params, "u", toplayerid))
{
if(toplayerid != INVALID_PLAYER_ID && Bit1_Get(g_PlayerLogged, toplayerid) != 0) {
GetPlayerHealth(toplayerid, shealth);
SetPlayerHealth(toplayerid, shealth-5);
GetPlayerPos(toplayerid, slx, sly, slz);
SetPlayerPosEx(toplayerid, slx, sly, slz+5);
PlayerPlaySound(toplayerid, 1130, slx, sly, slz+5);
}
else SendClientMessage(playerid, COLOR_RED, "That player is not online!");
}
else SendClientMessage(playerid, COLOR_RED, "/slap <playerid>");
}
else SendClientMessage(playerid, COLOR_RED, "You cant use this!");
return 1;
}




Re: Commands doesn't affect to player ID 2 - themaker - 28.03.2014

bump, come on need this urgent


Re: Commands doesn't affect to player ID 2 - jakejohnsonusa - 28.03.2014

Bumping topics within 24 hours is against forum rules.

My guess is that whoever is testing for you in ID 2 is the player that is bugged... it's not the script.


Re: Commands doesn't affect to player ID 2 - themaker - 28.03.2014

Quote:
Originally Posted by jakejohnsonusa
Посмотреть сообщение
Bumping topics within 24 hours is against forum rules.

My guess is that whoever is testing for you in ID 2 is the player that is bugged... it's not the script.
sorry for bump...

it's due to script because, if that user login with other ID script goes good with him, but other player who's id 2 can't affect any comamnd..


Re: Commands doesn't affect to player ID 2 - Konstantinos - 28.03.2014

If every user keeps bumping because "it's urgent" for them, then the forum will be spammed.

The only thing I can think of is problem with sscanf plugin. Update both plugin and include file, re-compile and try again.