Find Command with SetPlayerCheckpoint
#1

Hi, i 've tried to use this code here, to locate a player on the map.

if(strcmp("/find", cmdtext, true) == 0)
{
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, rot, "Verwendung: /find [spielerid]");
new pID;
pID = ReturnUser(playerid);
if(IsPlayerConnected(pID) && pID != playerid)
{
new name[24], string[128];
GetPlayerName(pID, name, sizeof name);
format(string, sizeof string,"Du hast die Suche nach %s gestartet !",name);
SendClientMessage(playerid, rot, string);
SetTimerEx("Suchen", 1000, 1, "ii",playerid,pID);
}
return 1;
}

forward Suchen(playerid, pID);
public Suchen(playerid, pID)
{
if(IsPlayerConnected(pID))
{
new Float: X, Float: Y, Float: Z;
GetPlayerPos(pID, X, Y, Z);
SetPlayerCheckpoint(playerid, X, Y, Z, 3.0);
}
else
{
DisablePlayerCheckpoint(playerid);
}
return 1;
}


In Pawn i got this error:
error 017: undefined symbol "ReturnUser"


So i found a stock for it and added this stock to the end of the script.


Now i got only one more error after compiling:

error 035: argument type mismatch (argument 1)
it's this line here:
pID = ReturnUser(playerid);



So maybe someone could help me please?

Thank You
Reply


Messages In This Thread
Find Command with SetPlayerCheckpoint - by dreamboxxl - 13.06.2012, 01:45
Re: Find Command with SetPlayerCheckpoint - by Yuryfury - 13.06.2012, 02:44
Re: Find Command with SetPlayerCheckpoint - by dreamboxxl - 13.06.2012, 02:59

Forum Jump:


Users browsing this thread: 2 Guest(s)