SA-MP Forums Archive
Help command greeting - 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: Help command greeting (/showthread.php?tid=429140)



Help command greeting - Hack4it - 08.04.2013

Hello I would like you to help me to create a command of greeting that puts the two players face each other and makes him shake hands or other animations of torque. example: /greets (id)
I've tried but I can not (the anim is wrong):

public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new xid, idx;
new tmp[256];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/greets", true) == 0) {
tmp = strtok(cmdtext, idx);

if(!strlen(tmp)) {
SendClientMessage(playerid,0x00FF00FF, "USAGE: /greets [playerid]");
return 1;
}
xid = strval(tmp);

if(!IsPlayerConnected(xid)) {
SendClientMessage(playerid,0x00FF00FF, "greets: player don't exists.");
return 1;
}
new Float, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerLookAt(xid, x, y);
GetPlayerPos(xid, x, y, z);
SetPlayerLookAt(playerid, x, y);
ApplyAnimation(playerid,"WUZI","Wuzi_Greet_Wuzi",4 .0,0,0,0,0,0);
ApplyAnimation(playerid,"WUZI","Wuzi_Greet_Wuzi",4 .0,0,0,0,0,0);
ApplyAnimation(xid,"WUZI","Wuzi_Greet_Wuzi",4.0,0, 0,0,0,0);
ApplyAnimation(xid,"WUZI","Wuzi_Greet_Wuzi",4.0,0, 0,0,0,0);
return 1;
}

return 1;
}


Re: Help command greeting - Hack4it - 09.04.2013

Up ...


Re: Help command greeting - Don_Cage - 09.04.2013

It is easier for us to read the code if you put it in [ pawn ] and [ /pawn ] tags