Stupid Questions - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Stupid Questions (
/showthread.php?tid=190050)
Stupid Questions -
Brian_Furious - 14.11.2010
I've got 2 questions:
I'm using ZCMD, and i want to put that if someone type a wrong command, to say "try /help for more infos" or something like this.
The other question is that:
I have this code:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
MySQLCheck();
for(new i = 0; i < 50; i++ ){
SendClientMessage(playerid, COLOR_WHITE, "");
}
new string[128],sendername[MAX_PLAYER_NAME];
format(sendername, sizeof(sendername), "%s", PlayerName(playerid));
if(IsPlayerNPC(playerid))
{
if(strcmp(sendername,"Spaciatore",true) == 0)
{
SetSpawnInfo(playerid,69,223,2286.4858,-2426.7209,3.0000,3.7297,-1,-1,-1,-1,-1,-1);
}
if(strcmp(sendername,"Binco",true) == 0)
{
SetSpawnInfo(playerid,69,211,207.5418,-98.6980,1005.2578,178.7630,-1,-1,-1,-1,-1,-1);
}
But i want to put that NPS like idles. how to do that (i dont remeber)
Re: Stupid Questions -
Lorenc_ - 14.11.2010
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(mypos, 5, cmdtext);
dcmd(train, 5, cmdtext);
return Sendclientmessage(playerid, color, "");
}
For ur first q.
Re: Stupid Questions -
GaGlets(R) - 14.11.2010
ZCMD - just use sscanf2 from ******.
Idle. Dont add that SetSpawninfo or add wariable to check if `SetSpawnInfo` is aviable to use.
if(variable = 1) SetSpawnInfo
else {} // leave blank
Re: Stupid Questions -
Scenario - 14.11.2010
Quote:
Originally Posted by Lorenc_
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(mypos, 5, cmdtext); dcmd(train, 5, cmdtext); return Sendclientmessage(playerid, color, ""); }
For ur first q.
|
Wrong. He is using "ZCMD", not "strcmp".
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) SendClientMessage(playerid, COLOR_GREY, "That command doesn't exist in our game-mode. (/commands)");
return 1;
}
Re: Stupid Questions -
Lorenc_ - 14.11.2010
Ohh sorry i never used zcmd b4..
This forum requires that you wait 120 seconds between posts. Please try again in 60 seconds.
GTFO.
Re: Stupid Questions -
Brian_Furious - 14.11.2010
Thanks RealCop228 for your answer, and all...but i didnt unsterdand the thing of idle NPC'S
Re: Stupid Questions -
The_Moddler - 14.11.2010
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
new string[128], sendername[25];
MySQLCheck();
for(new i = 0; i < 50; i++ )
{
SendClientMessage(playerid, COLOR_WHITE, "");
}
format(sendername, 25, "%s", PlayerName(playerid));
if(IsPlayerNPC(playerid))
{
if(strcmp(sendername,"Spaciatore",true) == 0)
{
SetPlayerSkin(playerid, 223);
SetPlayerPos(playerid, 2286.4858, -2426.7209, 3.0000);
SetPlayerFacingAngle(playerid, 3.7297);
}
if(strcmp(sendername,"Binco",true) == 0)
{
SetPlayerSkin(playerid, 211);
SetPlayerPos(playerid, 207.5418, -98.6980, 1005.2578);
SetPlayerFacingAngle(playerid, 178.7630);
}
}
return 1;
}