06.10.2011, 17:00
pawn Код:
new Squirtle[MAX_PLAYERS];
new SquirtleTime[MAX_PLAYERS];
forward Squirtle_I_Choose_Youuuuu(playerid)
public Squirtle_I_Choose_Youuuuu(playerid)
{
new Float:phrr[4];
GetPlayerPos(playerid, phrr[0],phrr[1],phrr[2]);
//GetPlayerFacingAngle(playerid, phrr[3]);
MoveObject(Squirtle[playerid], phrr[0]+0.5,phrr[1],phrr[2]/*,phrr[3],0,0*/);//uncomment this and the facing angle line if yo're using 0.3D
}
COMMAND:GOsquirtle(playerid,params[])
{
if( GetPlayerScore(playerid) >= 1000)
{
new Float:x1,Float:y1,Float:z1,Float:a;
GetPlayerPos(playerid,x1,y1,z1);;
GetPlayerFacingAngle(playerid, a);
Squirtle[playerid] = CreateObject(1609,x1,y1,z1-1,a,0.0,0.0);
SquirtleTime[playerid] = SetTimerEx("Squirtle_I_Choose_Youuuuu",1000,true, "i", playerid);
SendClientMessage(playerid, 0x00FF00FF,"You have bought turtle");
RewardPlayer(playerid, -40000, 0);
}
return 1;
}
//OnPlayerDisconnect or when he leave the turtle
KillTimer(SquirtleTime[playerid]);