Hello There, Guest! Login or Register


Need help with "PAWNO"
#3
Code:
if(strcmp(cmdtext, "/kill", true) == 0) return SetPlayerHealth(playerid,0);

I suggest making a teleport script using dcmd and sscanf, as they are the easiest functions when it comes down to it. More information can be found here.


Code:
dcmd_teleport(playerid,params[])
{
    new endid;
    if(sscanf(params, "d",endid)) return SendClientMessage(playerid,white,"Correct Usage: /teleport <playerid>");
    if(!IsPlayerConnected(endid)) return SendClientMessage(playerid,COLOR_RED,"Invalid player id.");
    if(playerid == endid) return SendClientMessage(playerid,red,"You can't teleport to yourself!");
    new Float:Pos[3];
    GetPlayerPos(endid,Pos[0],Pos[1],Pos[2]);
    SetPlayerPos(playerid,Pos[0]+1,Pos[1],Pos[2]);
    SetPlayerInterior(playerid,(GetPlayerInterior(endid)));
    return true;
}
Reply


Messages In This Thread
Need help with "PAWNO" - by blahc - 05-04-2008, 09:06 PM
Re: Need help with "PAWNO" - by AzTeC - 05-05-2008, 08:24 AM
Re: Need help with "PAWNO" - by Jay - 05-05-2008, 11:28 AM
Re: Need help with "PAWNO" - by blahc - 05-05-2008, 05:35 PM
Re: Need help with "PAWNO" - by blahc - 05-05-2008, 07:39 PM
Re: Need help with "PAWNO" - by Dimplex - 05-05-2008, 07:46 PM
Re: Need help with "PAWNO" - by blahc - 05-05-2008, 08:29 PM
Re: Need help with "PAWNO" - by Jay - 05-06-2008, 12:35 AM
Re: Need help with "PAWNO" - by Dimplex - 05-06-2008, 09:00 AM
Re: Need help with "PAWNO" - by blahc - 05-06-2008, 05:09 PM
Re: Need help with "PAWNO" - by FarePak - 05-06-2008, 08:02 PM
Re: Need help with "PAWNO" - by blahc - 05-07-2008, 06:38 AM