Need help SendClientMessage - 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: Need help SendClientMessage (
/showthread.php?tid=430446)
Need help SendClientMessage -
canip - 13.04.2013
Hello i hop you can help me.
I will have it so the another skins get a message " You can use this command "
PHP код:
if(!strcmp(cmdtext, "/opengdg2", true))
{
if(GetPlayerSkin(playerid) == 285)
if(IsPlayerInRangeOfPoint(playerid,45.0,2178.1000977,-2254.8500977,15.9700003))
{
MoveObject(GD2,2178.1000977,-2254.8500977,19.7900009, 2.0, 0.0, 0.0);
return 1;
}
else return SendClientMessage(playerid, COLOR_ORANGE, "You are not near the gate");
}
if(!strcmp(cmdtext, "/closegdg2", true))
{
if(GetPlayerSkin(playerid) == 285)
if(IsPlayerInRangeOfPoint(playerid,45.0,2178.1000977,-2254.8500977,15.9700003))
{
MoveObject(GD2,2178.1000977,-2254.8500977,15.9700003, 2.0, 0.0, 0.0);
return 1;
}
else return SendClientMessage(playerid, COLOR_ORANGE, "You are not near the gate");
}
return 0;
}
Re: Need help SendClientMessage -
JJB562 - 13.04.2013
Try this:
pawn Код:
if(!strcmp(cmdtext, "/opengdg2", true))
{
if(GetPlayerSkin(playerid) == 285)
{
if(IsPlayerInRangeOfPoint(playerid,45.0,2178.1000977,-2254.8500977,15.9700003))
{
MoveObject(GD2,2178.1000977,-2254.8500977,19.7900009, 2.0, 0.0, 0.0);
return 1;
}
else return SendClientMessage(playerid, COLOR_ORANGE, "You are not near the gate");
}
else return SendClientMessage(playerid, COLOR_ORANGE, "You can use this command.");
}
if(!strcmp(cmdtext, "/closegdg2", true))
{
if(GetPlayerSkin(playerid) == 285)
{
if(IsPlayerInRangeOfPoint(playerid,45.0,2178.1000977,-2254.8500977,15.9700003))
{
MoveObject(GD2,2178.1000977,-2254.8500977,15.9700003, 2.0, 0.0, 0.0);
return 1;
}
else return SendClientMessage(playerid, COLOR_ORANGE, "You are not near the gate");
}
else return SendClientMessage(playerid, COLOR_ORANGE, "You can use this command.");
}
return 0;
}
I'm pretty sure you meant "You CAN'T use this command.", but I wasn't sure so I made it say "You can use this command."