29.12.2011, 01:09
Well, I'm not a great scripter but I've been trying to learn and while I'm doing this part I'm having trouble.
Basically what I am trying to is, if a player types /enter on a pickup I've put down, it will set their interior id and position through SetPlayerInterior and SetPlayerPos, and if they are not near that pickup, it will send them a message through SendClientMessage saying they are not near it.
Here is the code I tried.
And here is the error I am getting
I searched on it but couldn't find anything to help me. So any help would be appreciated and I'm sure it is something so simple, so I'm pretty sure I will get a simple answer.
Basically what I am trying to is, if a player types /enter on a pickup I've put down, it will set their interior id and position through SetPlayerInterior and SetPlayerPos, and if they are not near that pickup, it will send them a message through SendClientMessage saying they are not near it.
Here is the code I tried.
Код:
if (strcmp("/enter", cmdtext, true, 10) == 0) { if (IsPlayerInRangeOfPoint(playerid, 846.1998, -1292.7142, 13.6526)) SetPlayerInterior(playerid, 18); SetPlayerPos(playerid, 1302.519897, -1.787510, 1001.028259); else SendClientMessage(playerid, COLOR_YELLOW, "You are not near the car garage!"); return 1; }
Код:
C:\Documents and Settings\HP_Owner\My Documents\SA-MP Scripting Files\pawno\vinewoodwarehouse.pwn(170) : warning 202: number of arguments does not match definition C:\Documents and Settings\HP_Owner\My Documents\SA-MP Scripting Files\pawno\vinewoodwarehouse.pwn(171) : error 029: invalid expression, assumed zero