Transfer it to ZCMD
#1

Can someone help me to transfer it to ZCMD?
Quote:

public OnPlayerCommandText( playerid,cmdtext[])
{
if(strcmp("/create [modelid]", cmdtext, true, 7) == 0)
{
SendClientMessage(playerid,0xFFFFFFFF,"you have entered a create command");
new modelid;
GetPlayerPos(playerid, X, Y, Z);
new Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ;
CreateObject(modelid, X, Y, Z, rX, rY, rZ);
return 1;

}
return 0;
}

Thanks!
Reply
#2

pawn Код:
CMD:create(playerid,params[])
{
    new modelid;
    if(isnull(params)) SendClientMessage(playerid,-1,"Usage: /create object_modelid");
    else if(!IsValidObject((modelid = strval(params)))) SendClientMessage(playerid,-1,"Invalid modelid");
    else{
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        CreateObject(modelid, X, Y, Z, 0.0, 0.0, 0.0);
    }
    return 1;
}
Reply
#3

Its So Simple:

Код:
CMD:create(playerid, params[])   //this tells the server which command is being used
{
SendClientMessage(playerid,0xFFFFFFFF,"you have entered a create command");  //sends the client message to the player who typed this CMD
new modelid;  
GetPlayerPos(playerid, X, Y, Z);  // get the player current position
new Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ; 
CreateObject(modelid, X, Y, Z, rX, rY, rZ);  // creates an object at the player location
return 1; //returns a value 
}
Hope i Helped!
Reply
#4

Quote:
Originally Posted by Jefff
Посмотреть сообщение
pawn Код:
CMD:create(playerid,params[])
{
    new modelid;
    if(isnull(params)) SendClientMessage(playerid,-1,"Usage: /create object_modelid");
    else if(!IsValidObject((modelid = strval(params)))) SendClientMessage(playerid,-1,"Invalid modelid");
    else{
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        CreateObject(modelid, X, Y, Z, 0.0, 0.0, 0.0);
    }
    return 1;
}
Quote:
Originally Posted by TahaAsif12
Посмотреть сообщение
Its So Simple:

Код:
CMD:create(playerid, params[])   //this tells the server which command is being used
{
SendClientMessage(playerid,0xFFFFFFFF,"you have entered a create command");  //sends the client message to the player who typed this CMD
new modelid;  
GetPlayerPos(playerid, X, Y, Z);  // get the player current position
new Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ; 
CreateObject(modelid, X, Y, Z, rX, rY, rZ);  // creates an object at the player location
return 1; //returns a value 
}
Hope i Helped!
Thanks! Rep+1 for you both!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)