22.09.2013, 18:27
Hey guys check out my command im ain't know what wrong im really beginner so im trying to learn, so please if you editing and its works tell me what you did ! thanks
Код HTML:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#define COLOR_GOLDENROD 0xDAA520FF
#define FILTERSCRIPT
public OnPlayerCommandText(playerid, cmdtext[]) // basiclly im want when player writing /infernus he teleporting infernus to his place *position*, and he get client message, "you have been teleported "nfernus" to your position
{
if (strcmp("/infernus", cmdtext, true, 10) == 0)
{
new Float:x, Float:y, Float:z, Float:a, Infernus;
GetPlayerPos(playerid,x,y,z);
GetPlayerFacingAngle(playerid, a);
Infernus = CreateVehicle(411, x, y, z, a, -1, -1, 60);
PutPlayerInVehicle(playerid, Infernus, 0);
new string[19];
format(string,sizeof(string),"You have been teleported %s to your place",GetPlayerVehicleID(playerid)); //in the string im want to say : You have been teleported "infernus" to your place
SendClientMessage(playerid,0xDAA520FF,string);
return 1;
}
return 0;
}